details: https://code.openbravo.com/erp/devel/pi/rev/93367ec81ec7
changeset: 15635:93367ec81ec7
user: Javier Etxarri <javier.echarri <at> openbravo.com>
date: Tue Feb 28 13:33:47 2012 +0100
summary: Fixes issue 19620: A Commit is done in
ma_workeffort_validate() with an Extension Point configures
diffstat:
src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml | 2 +-
src-db/database/model/functions/MA_WRPHASE_CLOSE.xml | 17 +++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
diffs (62 lines):
diff -r 5e2e3880c5ef -r 93367ec81ec7
src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
--- a/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml Tue Feb
28 13:26:38 2012 +0100
+++ b/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml Tue Feb
28 13:33:47 2012 +0100
@@ -343,7 +343,7 @@
v_User_ID, v_Client_ID, v_Org_ID, now(), v_User_ID,
now(), v_User_ID
);
- MA_WRPHASE_CLOSE(v_AD_Pinstance_ID);
+ MA_WRPHASE_CLOSE(v_AD_Pinstance_ID,'N');
END IF;
END LOOP;
-- Indicate that we are done
diff -r 5e2e3880c5ef -r 93367ec81ec7
src-db/database/model/functions/MA_WRPHASE_CLOSE.xml
--- a/src-db/database/model/functions/MA_WRPHASE_CLOSE.xml Tue Feb 28
13:26:38 2012 +0100
+++ b/src-db/database/model/functions/MA_WRPHASE_CLOSE.xml Tue Feb 28
13:33:47 2012 +0100
@@ -4,6 +4,9 @@
<parameter name="p_pinstance_id" type="VARCHAR" mode="in">
<default/>
</parameter>
+ <parameter name="p_calledfromapp" type="VARCHAR" mode="in">
+ <default><![CDATA[Y]]></default>
+ </parameter>
<body><![CDATA[/*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
@@ -37,7 +40,7 @@
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' ||
p_PInstance_ID) ;
v_ResultStr:='PInstanceNotFound';
- AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'Y', NULL, NULL) ;
+ AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'Y', NULL, NULL,
p_calledfromapp) ;
-- Get Parameters
v_ResultStr:='ReadingParameters';
FOR Cur_Parameter IN
@@ -84,7 +87,7 @@
IF(p_PInstance_ID IS NOT NULL) THEN
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
- AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 1, v_Message) ;
+ AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 1, v_Message,
p_calledfromapp) ;
ELSE
DBMS_OUTPUT.PUT_LINE('--<<MA_WorkRequirement_Process finished>> ' ||
v_Message) ;
END IF;
@@ -95,11 +98,15 @@
v_ResultStr:= '@ERROR=' || SQLERRM;
DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
IF(p_PInstance_ID IS NOT NULL) THEN
- ROLLBACK;
- AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
+ AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0,
v_ResultStr,p_calledfromapp) ;
+ IF (p_calledfromapp = 'Y') THEN
+ ROLLBACK;
+ RETURN;
+ ELSE
+ RAISE;
+ END IF;
END IF;
--p_Invoice_ID := 0; -- Error Indicator
- RETURN;
END MA_WRPHASE_CLOSE
]]></body>
</function>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits