src-db/database/model/functions/M_INOUT_POST.xml
changeset 27385 1d9e795478ba
parent 27384 f8dc8ea21e39
child 27386 6db6e5448fd2
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Thu Aug 20 10:41:31 2015 +0200
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Fri Aug 21 13:33:27 2015 +0200
@@ -800,7 +800,7 @@
             END IF;
             IF(Cur_InOutLine.M_Product_ID IS NOT NULL AND v_IsStocked=1) THEN
               SELECT AD_Org_ID INTO v_Locator_Org_ID FROM M_Locator L WHERE M_Locator_ID = Cur_InOutLine.M_Locator_ID;
-              M_Check_Stock(Cur_InOutLine.M_Product_ID, v_AD_Client_ID, v_Locator_Org_ID, v_Result, v_Message) ;
+              M_Check_Stock(Cur_InOutLine.M_Product_ID, v_AD_Client_ID, Cur_InOutLine.AD_Org_ID, v_Result, v_Message) ;
               IF v_Result=0 THEN
                 SELECT name INTO v_ProductName FROM M_Product WHERE M_Product_id = Cur_InOutLine.M_Product_ID;
 			    RAISE_APPLICATION_ERROR(-20000, v_Message||' '||'@line@'||' '||Cur_InOutLine.line||', '||'@Product@'||' '||v_ProductName) ;