Fix: Warning always visible

This commit is contained in:
Laurent Destailleur 2011-12-03 15:21:33 +01:00
parent 7f3c336b7b
commit 010964ad54

View File

@ -300,7 +300,7 @@ if ($resql)
$total_ht=0;
$total_ttc=0;
$total_paid=0;
$facturestatic=new Facture($db);
print '<form id="form_generate_pdf" method="POST" action="'.$_SERVER["PHP_SELF"].'?sortfield='. $sortfield .'&sortorder='. $sortorder .'">';
@ -309,6 +309,7 @@ if ($resql)
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$date_limit=$db->jdate($objp->datelimite);
$var=!$var;
@ -330,7 +331,7 @@ if ($resql)
// Warning picto
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
if ($objp->datelimite < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
if ($date_limit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
print '</td>';
// PDF Picto