Fix: If end date is not defined, we can't say it is too late.

This commit is contained in:
Laurent Destailleur 2014-01-15 15:42:14 +01:00
parent 9aacb0e7ed
commit af4d48aec0

View File

@ -1378,7 +1378,7 @@ class FactureFournisseur extends CommonInvoice
while ($obj=$this->db->fetch_object($resql))
{
$this->nbtodo++;
if ($this->db->jdate($obj->datefin) < ($now - $conf->facture->fournisseur->warning_delay)) $this->nbtodolate++;
if (! empty($obj->datefin) && $this->db->jdate($obj->datefin) < ($now - $conf->facture->fournisseur->warning_delay)) $this->nbtodolate++;
}
$this->db->free($resql);
return 1;