From 3050facb967ca7c64f7551f6645df5ee849f3f0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Oct 2013 18:29:34 +0200 Subject: [PATCH] Fix: [ bug #1070 ] Accountancy code not displayed just after set Conflicts: htdocs/product/fiche.php --- htdocs/product/fiche.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 2b23ba4722b..c58c15bed5e 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -123,16 +123,16 @@ if (empty($reshook)) if ($action == 'setaccountancy_code_buy') { $result = $object->setValueFrom('accountancy_code_buy', GETPOST('accountancy_code_buy')); - if ($result < 0) - setEventMessage(join(',',$object->errors), 'errors'); + if ($result < 0) setEventMessage(join(',',$object->errors), 'errors'); + else $object->accountancy_code_buy=GETPOST('accountancy_code_buy'); $action=""; } if ($action == 'setaccountancy_code_sell') { $result = $object->setValueFrom('accountancy_code_sell', GETPOST('accountancy_code_sell')); - if ($result < 0) - setEventMessage(join(',',$object->errors), 'errors'); + if ($result < 0) setEventMessage(join(',',$object->errors), 'errors'); + else $object->accountancy_code_sell=GETPOST('accountancy_code_sell'); $action=""; } @@ -369,7 +369,7 @@ if (empty($reshook)) { $result = $object->delete($object->id); } - + if ($result > 0) { header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.urlencode($object->ref));