details:   https://code.openbravo.com/erp/devel/pi/rev/98eff0cfcf9a
changeset: 17771:98eff0cfcf9a
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Mon Aug 27 11:40:36 2012 +0200
summary:   issue 19405: Error when you try to change a period's name in Oracle.
Added return clause

diffstat:

 src-db/database/model/triggers/C_PERIOD_TRG3.xml |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r bf696bc33d67 -r 98eff0cfcf9a 
src-db/database/model/triggers/C_PERIOD_TRG3.xml
--- a/src-db/database/model/triggers/C_PERIOD_TRG3.xml  Tue Jul 31 11:40:25 
2012 +0200
+++ b/src-db/database/model/triggers/C_PERIOD_TRG3.xml  Mon Aug 27 11:40:36 
2012 +0200
@@ -22,6 +22,10 @@
     TYPE RECORD IS REF CURSOR;
     Cur_Period RECORD;
 Begin
+
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+
     For Cur_Period In
       (Select * 
       From C_Period
@@ -36,12 +40,13 @@
        Where C_Period_Id <> Cur_Period.C_Period_Id
        And Ad_Org_Id=Cur_Period.Ad_Org_Id
        And Cur_Period.startdate <= Enddate
-                        And Cur_Period.Enddate >= Startdate;
+       And Cur_Period.Enddate >= Startdate;
        If (V_COUNT > 0) Then
          RAISE_APPLICATION_ERROR(-20000, '@DatesOverlapped@');
        End if;
     End Loop;
-END C_PERIOD_TRG3
+
+    END C_PERIOD_TRG3
 ]]></body>
     </trigger>
   </database>

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