details:   https://code.openbravo.com/erp/devel/pi/rev/0f98157d9e2b
changeset: 17793:0f98157d9e2b
user:      Naiara Martinez <naiara.martinez <at> openbravo.com>
date:      Wed Aug 29 09:11:25 2012 +0200
summary:   Related to issue 21317, Related to issue 20491, related to issue 
20501, related to issue 20468
Get the uuid in a variable and use that variable.

diffstat:

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

diffs (27 lines):

diff -r 19952d22eb0a -r 0f98157d9e2b 
src-db/database/model/functions/C_COMMISSION_PROCESS.xml
--- a/src-db/database/model/functions/C_COMMISSION_PROCESS.xml  Tue Aug 28 
23:08:00 2012 +0200
+++ b/src-db/database/model/functions/C_COMMISSION_PROCESS.xml  Wed Aug 29 
09:11:25 2012 +0200
@@ -139,6 +139,7 @@
     AD_Sequence_Doc('DocumentNo_C_CommissionRun', v_AD_Client_ID, 'Y', 
v_DocumentNo) ;
     DBMS_OUTPUT.PUT_LINE('Create: ' || v_DocumentNo || ' - ' || v_Name) ;
     v_ResultStr:='InsertingHeader';
+    v_C_CommissionRun_ID:= get_uuid();
     INSERT
     INTO C_CommissionRun
       (
@@ -149,13 +150,12 @@
       )
       VALUES
       (
-        get_uuid(), v_Record_ID, v_AD_Client_ID, v_AD_Org_ID,
+        v_C_CommissionRun_ID, v_Record_ID, v_AD_Client_ID, v_AD_Org_ID,
          'Y', now(), '0', now(),
         '0', v_DocumentNo, v_Name, v_StartDate,
         0, 'N', 'N'
-      )
+      )  
       ;
-    select C_CommissionRun_ID INTO  v_C_CommissionRun_ID from C_CommissionRun 
where created = (select max(created) from C_CommissionRun);
     --
     v_ResultStr:='Update Record';
     UPDATE C_Commission

------------------------------------------------------------------------------
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