From 787083028b2288892aef4eb7a7c3d8a83ef9998f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Apr 2015 12:10:05 +0200 Subject: [PATCH] Fix: entered data are not lsot when error --- htdocs/fourn/commande/dispatch.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index bac6ace77e3..429378ac291 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -493,13 +493,15 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - print ''; + print ''; print ''; print ''; - $form->select_date('','dlc'.$suffix,'','',1,""); + $dlcdatesuffix=dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); + $form->select_date($dlcdatesuffix,'dlc'.$suffix,'','',1,""); print ''; print ''; - $form->select_date('','dluo'.$suffix,'','',1,""); + $dluodatesuffix=dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); + $form->select_date($dluodatesuffix,'dluo'.$suffix,'','',1,""); print ''; print ' '; // Qty ordered + qty already dispatached } @@ -512,7 +514,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; } - print ''; + print ''; print ''; // Warehouse @@ -570,7 +572,8 @@ if ($id > 0 || ! empty($ref)) dol_fiche_end(); - // List of already dispatching + + // List of lines already dispatched $sql = "SELECT p.ref, p.label,"; $sql.= " e.rowid as warehouse_id, e.label as entrepot,"; $sql.= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status";