From 17dec4b924c2fca89a3a6d1d6ddae2f9e6429ef6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 2 Sep 2014 13:05:03 +0200 Subject: [PATCH] Fix: Bad merge --- htdocs/compta/facture.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1cf4649547c..8138c56450e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -248,16 +248,18 @@ else if ($action == 'setmode' && $user->rights->facture->creer) { dol_print_error($db, $object->error); } -else if ($action == 'setinvoicedate' && $user->rights->facture->creer) { +else if ($action == 'setinvoicedate' && $user->rights->facture->creer) +{ $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; - $object->date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); + $date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); if (empty($date)) { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate'); exit; } + $object->date=$date; $new_date_lim_reglement = $object->calculate_date_lim_reglement(); if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement; if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date; -- GitLab