Skip to content

Commit

Permalink
FIX False positive on services not activated
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 10, 2016
1 parent 71a573d commit c2ce5c4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions htdocs/contrat/services.php
Expand Up @@ -308,11 +308,16 @@
while ($i < min($num,$limit))
{
$obj = $db->fetch_object($resql);

$contractstatic->id=$obj->cid;
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;

$var=!$var;

print "<tr ".$bc[$var].">";

// Ref
print '<td>';
$contractstatic->id=$obj->cid;
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
print $contractstatic->getNomUrl(1,16);
print '</td>';

Expand Down Expand Up @@ -348,7 +353,7 @@
{
print '<td align="center">';
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");
else print '&nbsp;&nbsp;&nbsp;&nbsp;';
print '</td>';
Expand All @@ -357,7 +362,7 @@
{
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)
{
print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):'&nbsp;');
Expand Down

0 comments on commit c2ce5c4

Please sign in to comment.