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.
This commit is contained in:
damien clochard 2013-12-06 13:08:30 +01:00
parent 4d9712ea4c
commit c36ba2a8ea

View File

@ -325,7 +325,8 @@ if ($resql)
print '</td>';
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
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 ' <span class="note">';