FIX False positive on services not activated

This commit is contained in:
Laurent Destailleur 2016-11-10 11:54:02 +01:00
parent 71a573df61
commit c2ce5c4eeb

View File

@ -308,11 +308,16 @@ if ($resql)
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>';
$contractstatic->id=$obj->cid; $contractstatic->id=$obj->cid;
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid; $contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
$var=!$var;
print "<tr ".$bc[$var].">";
// Ref
print '<td>';
print $contractstatic->getNomUrl(1,16); print $contractstatic->getNomUrl(1,16);
print '</td>'; print '</td>';
@ -348,7 +353,7 @@ if ($resql)
{ {
print '<td align="center">'; print '<td align="center">';
print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue)):'&nbsp;'); print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue)):'&nbsp;');
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"); print ' '.img_picto($langs->trans("Late"),"warning");
else print '&nbsp;&nbsp;&nbsp;&nbsp;'; else print '&nbsp;&nbsp;&nbsp;&nbsp;';
print '</td>'; print '</td>';
@ -357,7 +362,7 @@ if ($resql)
{ {
print '<td align="center">'.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture)):'&nbsp;').'</td>'; print '<td align="center">'.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture)):'&nbsp;').'</td>';
} }
// Date fin // End date
if (($mode == "" || $mode == -1) || $mode < 5) if (($mode == "" || $mode == -1) || $mode < 5)
{ {
print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):'&nbsp;'); print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):'&nbsp;');