Merge pull request #19870 from fappels/15_fix_dispatchProduct

FIX: origin missing for supplier order dispatchProduct
This commit is contained in:
Laurent Destailleur 2022-01-19 01:07:05 +01:00 committed by GitHub
commit 7bc0f44e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2012,6 +2012,8 @@ class CommandeFournisseur extends CommonOrder
if ($product > 0) {
// $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on)
$mouv->origin = &$this;
$mouv->origin_type = $this->element;
$mouv->origin_id = $this->id;
$result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch);
if ($result < 0) {
$this->error = $mouv->error;