From e6d016cc48c4ec75a9016ac6840299c4ad6999eb Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 12 Jan 2015 20:55:15 +0100
Subject: [PATCH] Fixed: pmp update after makign a stock move.

---
 htdocs/product/stock/product.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 1efc3924aa7..352750295af 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -199,7 +199,8 @@ if ($action == "transfert_stock" && ! $cancel)
 
 				// Define value of products moved
 				$pricesrc=0;
-				if (isset($product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp)) $pricesrc=$product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp;
+				//if (isset($product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp)) $pricesrc=$product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp;
+				if (isset($product->pmp)) $pricesrc=$product->pmp;
 				$pricedest=$pricesrc;
 
 				$pdluoid=GETPOST('pdluoid','int');
-- 
GitLab