Merge pull request #14183 from FHenry/12.0

remove warning when date end contract line empty
This commit is contained in:
Laurent Destailleur 2020-07-06 12:06:42 +02:00 committed by GitHub
commit 21bec139ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ class box_services_contracts extends ModeleBoxes
$thirdpartytmp->code_compta_fournisseur = $objp->code_compta_fournisseur;
$dateline = $this->db->jdate($objp->date_line);
if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->statut == ContratLigne::STATUS_OPEN && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->statut == ContratLigne::STATUS_OPEN && !empty($dateline) && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
// Multilangs
if (!empty($conf->global->MAIN_MULTILANGS) && $objp->product_id > 0) // if option multilang is on