From 22412443fe7e501fbc126dec576f5045cfc33919 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Dec 2013 18:12:13 +0100 Subject: [PATCH] Fix: Overwrite bad value of limit payment date only if payment date is defined. --- htdocs/fourn/facture/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 396e5155818..7402272fe73 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -221,7 +221,7 @@ elseif ($action == 'setdatef' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->date=dol_mktime(12,0,0,$_POST['datefmonth'],$_POST['datefday'],$_POST['datefyear']); - if ($object->date_echeance < $object->date) $object->date_echeance=$object->date; + if ($object->date_echeance && $object->date_echeance < $object->date) $object->date_echeance=$object->date; $result=$object->update($user); if ($result < 0) dol_print_error($db,$object->error); }