FIX Missing trans

This commit is contained in:
Laurent Destailleur 2021-11-19 14:01:31 +01:00
parent bb6440af9d
commit 35b1868693
2 changed files with 11 additions and 3 deletions

View File

@ -47,4 +47,6 @@ ReceptionsNumberingModules=Numbering module for receptions
ReceptionsReceiptModel=Document templates for receptions
NoMorePredefinedProductToDispatch=No more predefined products to dispatch
ReceptionExist=A reception exists
ReceptionBackToDraftInDolibarr=Reception %s back to draft
ReceptionBackToDraftInDolibarr=Reception %s back to draft
ReceptionClassifyClosedInDolibarr=Reception %s classified Closed
ReceptionUnClassifyCloseddInDolibarr=Reception %s re-open

View File

@ -1689,6 +1689,7 @@ class Reception extends CommonObject
// 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
$inventorycode = '';
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionUnClassifyCloseddInDolibarr", $numref), '', '', '', '', 0, $inventorycode);
if ($result < 0) {
$this->error = $mouvS->error;
$this->errors = $mouvS->errors;
@ -1721,10 +1722,15 @@ class Reception extends CommonObject
}
}
if ($this->origin == 'order_supplier') {
if (!$error && $this->origin == 'order_supplier') {
$commande = new CommandeFournisseur($this->db);
$commande->fetch($this->origin_id);
$commande->setStatus($user, 4);
$result = $commande->setStatus($user, 4);
if ($result < 0) {
$error++;
$this->error = $commande->error;
$this->errors = $commande->errors;
}
}
} else {
$error++;