diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 8e37e392603..577e850b2f4 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -308,11 +308,16 @@ if ($resql) while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $var=!$var; - print ""; - print ''; + $contractstatic->id=$obj->cid; $contractstatic->ref=$obj->ref?$obj->ref:$obj->cid; + + $var=!$var; + + print ""; + + // Ref + print ''; print $contractstatic->getNomUrl(1,16); print ''; @@ -348,7 +353,7 @@ if ($resql) { print ''; print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue)):' '); - if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay))) + if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0) print ' '.img_picto($langs->trans("Late"),"warning"); else print '    '; print ''; @@ -357,7 +362,7 @@ if ($resql) { print ''.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture)):' ').''; } - // Date fin + // End date if (($mode == "" || $mode == -1) || $mode < 5) { print ''.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):' ');