diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 869eb03feb6..481a01b8980 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -316,7 +316,8 @@ if ($resql) print ''; print ''; - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); + if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay)) + print img_picto($langs->trans("Late"),"warning"); print ''; print '';