details:   https://code.openbravo.com/erp/devel/pi/rev/8b2d0f4ae3fe
changeset: 16458:8b2d0f4ae3fe
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Wed May 09 10:08:27 2012 +0200
summary:   Fixes issue 20280: Insufficient stock message needs to be improved.

diffstat:

 src-db/database/model/functions/M_INOUT_POST.xml |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 1ac6a16a51d7 -r 8b2d0f4ae3fe 
src-db/database/model/functions/M_INOUT_POST.xml
--- a/src-db/database/model/functions/M_INOUT_POST.xml  Wed May 09 09:57:57 
2012 +0200
+++ b/src-db/database/model/functions/M_INOUT_POST.xml  Wed May 09 10:08:27 
2012 +0200
@@ -22,7 +22,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -91,6 +91,7 @@
     Cur_MILines RECORD;
     FINISH_PROCESS BOOLEAN:=false;
     v_Aux NUMBER;
+    v_ProductName VARCHAR2(40);
   BEGIN
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
@@ -380,7 +381,8 @@
             IF(Cur_InOutLine.M_Product_ID IS NOT NULL AND v_IsStocked=1) THEN
               M_Check_Stock(Cur_InOutLine.M_Product_ID, v_AD_Client_ID, 
v_AD_Org_ID, v_Result, v_Message) ;
               IF v_Result=0 THEN
-                           RAISE_APPLICATION_ERROR(-20000, v_Message||' 
'||'@line@'||' '||Cur_InOutLine.line) ;
+                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) ;
               END IF;
             END IF;
           END LOOP; -- For all InOut Lines

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to