FIX: origin missing for supplier order dispatchProduct

This commit is contained in:
Francis Appels 2022-01-18 16:22:41 +01:00
parent 200f796232
commit d4adeba1fc

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;