Fix missing inventorycode

This commit is contained in:
Laurent Destailleur 2022-09-24 11:40:41 +02:00
parent 5964485159
commit 9a40bfdbfb

View File

@ -2092,7 +2092,7 @@ class CommandeFournisseur extends CommonOrder
// Method change if qty < 0
if (!empty($conf->global->SUPPLIER_ORDER_ALLOW_NEGATIVE_QTY_FOR_SUPPLIER_ORDER_RETURN) && $qty < 0) {
$result = $mouv->livraison($user, $product, $entrepot, $qty*(-1), $price, $comment, $now, $eatby, $sellby, $batch);
$result = $mouv->livraison($user, $product, $entrepot, $qty*(-1), $price, $comment, $now, $eatby, $sellby, $batch, 0, $inventorycode);
} else {
$result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch, '', 0, $inventorycode);
}