diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 6c8c7d16c96..241a0fb1bc9 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -125,16 +125,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=""; } @@ -386,7 +386,7 @@ if (empty($reshook)) { $result = $object->delete($object->id); } - + if ($result > 0) { header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.urlencode($object->ref)); @@ -736,7 +736,7 @@ else print ''; print ''; } - + // Description (used in invoice, propal...) print '