From 4a10874f54a00157110259e33d698b3c7fb7361c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Oct 2012 13:01:29 +0200 Subject: [PATCH] New: add waring message when date is too low. --- htdocs/fourn/facture/fiche.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 82839fc40e3..9aca380a9fa 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -188,7 +188,11 @@ elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->factur { $object->fetch($id); $object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']); - if ($object->date_echeance < $object->date) $object->date_echeance=$object->date; + if ($object->date_echeance < $object->date) + { + $object->date_echeance=$object->date; + setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings'); + } $result=$object->update($user); if ($result < 0) dol_print_error($db,$object->error); }