From c36ba2a8ea2e3f013e9f357a16720911724ca32d Mon Sep 17 00:00:00 2001 From: damien clochard Date: Fri, 6 Dec 2013 13:08:30 +0100 Subject: [PATCH] bug #1179 if there's a delivery date (date_livraison) then use it instead of the validation date (date_valid) to check if we need to display a warning or not... For example, if we are in Septembre and there's an order that was validated in june but its delivery date is set to november then a warning is not necessary, since there's nothing to do but wait for the order to be delivered. --- htdocs/commande/liste.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 6b1ebc5ac14..41ec59c4ff5 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -325,7 +325,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_livrais +on)) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); if(!empty($objp->note_private)) { print ' ';