From d4adeba1fcd3d0c01eb83ef545968655d1c4aaaa Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 18 Jan 2022 16:22:41 +0100 Subject: [PATCH] FIX: origin missing for supplier order dispatchProduct --- htdocs/fourn/class/fournisseur.commande.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 83b737a050e..0151af97acf 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -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;