Fix: [ bug #1280 ] service with not end of date was tagged as expired.
This commit is contained in:
parent
8bd72cc21f
commit
748d769140
@ -39,6 +39,7 @@ Fix: [ bug #1206 ] PMP price is bad calculated.
|
|||||||
Fix: [ bug #520 ] Product statistics and detailed lists are wrong.
|
Fix: [ bug #520 ] Product statistics and detailed lists are wrong.
|
||||||
Fix: [ bug #1240 ] traduction.
|
Fix: [ bug #1240 ] traduction.
|
||||||
Fix: [ bug #1238 ] When creating accompte with a %, free product are used for calculation.
|
Fix: [ bug #1238 ] When creating accompte with a %, free product are used for calculation.
|
||||||
|
Fix: [ bug #1280 ] service with not end of date was tagged as expired.
|
||||||
|
|
||||||
***** ChangeLog for 3.5 compared to 3.4.* *****
|
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -569,7 +569,7 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
if ($line->statut == 0) $this->nbofserviceswait++;
|
if ($line->statut == 0) $this->nbofserviceswait++;
|
||||||
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||||
if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
if ($line->statut == 4 && (! empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++;
|
||||||
if ($line->statut == 5) $this->nbofservicesclosed++;
|
if ($line->statut == 5) $this->nbofservicesclosed++;
|
||||||
|
|
||||||
$total_ttc+=$objp->total_ttc; // TODO Not saved into database
|
$total_ttc+=$objp->total_ttc; // TODO Not saved into database
|
||||||
@ -654,7 +654,7 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
if ($line->statut == 0) $this->nbofserviceswait++;
|
if ($line->statut == 0) $this->nbofserviceswait++;
|
||||||
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||||
if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
if ($line->statut == 4 && (! empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++;
|
||||||
if ($line->statut == 5) $this->nbofservicesclosed++;
|
if ($line->statut == 5) $this->nbofservicesclosed++;
|
||||||
|
|
||||||
$this->lines[] = $line;
|
$this->lines[] = $line;
|
||||||
@ -1799,7 +1799,7 @@ class ContratLigne
|
|||||||
*/
|
*/
|
||||||
function getLibStatut($mode)
|
function getLibStatut($mode)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->statut,$mode,(isset($this->date_fin_validite)?($this->date_fin_validite < dol_now()?1:0):-1));
|
return $this->LibStatut($this->statut,$mode,((! empty($this->date_fin_validite))?($this->date_fin_validite < dol_now()?1:0):-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -241,7 +241,7 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
|||||||
for ($i=0;$i<$num;$i++)
|
for ($i=0;$i<$num;$i++)
|
||||||
{
|
{
|
||||||
$product_type=($lines[$i]->product_type?$lines[$i]->product_type:0);
|
$product_type=($lines[$i]->product_type?$lines[$i]->product_type:0);
|
||||||
|
|
||||||
if ($product_type == 1) { //only services // TODO Exclude also deee
|
if ($product_type == 1) { //only services // TODO Exclude also deee
|
||||||
// service prédéfini
|
// service prédéfini
|
||||||
if ($lines[$i]->fk_product > 0)
|
if ($lines[$i]->fk_product > 0)
|
||||||
@ -929,7 +929,7 @@ else
|
|||||||
{
|
{
|
||||||
$result=$object->fetch($id,$ref);
|
$result=$object->fetch($id,$ref);
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
$result=$object->fetch_lines();
|
$result=$object->fetch_lines(); // This also init $this->nbofserviceswait, $this->nbofservicesopened, $this->nbofservicesexpired=, $this->nbofservicesclosed
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
$result=$object->fetch_thirdparty();
|
$result=$object->fetch_thirdparty();
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user