mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix error management
This commit is contained in:
parent
569320424b
commit
f26b5b58c9
|
|
@ -161,6 +161,9 @@ if (empty($reshook)) {
|
|||
if ($action == 'reopen' && $user->rights->expedition->creer) {
|
||||
$object->fetch($id);
|
||||
$result = $object->reOpen();
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Set incoterm
|
||||
|
|
|
|||
|
|
@ -2388,7 +2388,7 @@ class Expedition extends CommonObject
|
|||
// line without batch detail
|
||||
|
||||
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
||||
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ShipmentUnClassifyCloseddInDolibarr", $numref));
|
||||
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ShipmentUnClassifyCloseddInDolibarr", $this->ref));
|
||||
if ($result < 0) {
|
||||
$this->error = $mouvS->error;
|
||||
$this->errors = $mouvS->errors;
|
||||
|
|
@ -2399,7 +2399,7 @@ class Expedition extends CommonObject
|
|||
// line with batch detail
|
||||
|
||||
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
||||
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ShipmentUnClassifyCloseddInDolibarr", $numref), '', $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock);
|
||||
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ShipmentUnClassifyCloseddInDolibarr", $this->ref), '', $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock);
|
||||
if ($result < 0) {
|
||||
$this->error = $mouvS->error;
|
||||
$this->errors = $mouvS->errors;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user