[Reservations]Fix pg consistency issues.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Thu, 25 Oct 2012 17:20:43 +0200
changeset 18663 157c92ecd0e2
parent 18662 c05cf8173234
child 18664 096e9ef090a6
[Reservations]Fix pg consistency issues.
src-db/database/model/functions/M_CREATE_RESERVE_FROM_SOL.xml
src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml
src-db/database/model/functions/M_RESERVATION_POST.xml
src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml
src-db/database/model/functions/M_RESERVE_STOCK_MANUAL.xml
src-db/database/model/triggers/M_RESERVATION_STOCK_TRG.xml
--- a/src-db/database/model/functions/M_CREATE_RESERVE_FROM_SOL.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/functions/M_CREATE_RESERVE_FROM_SOL.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -78,6 +78,7 @@
 
   p_reservation_id := v_reservation_id;
 RETURN;
-END M_CREATE_RESERVE_FROM_SOL]]></body>
+END M_CREATE_RESERVE_FROM_SOL
+]]></body>
     </function>
   </database>
--- a/src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/functions/M_RESERVATION_CONSUMPTION.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -330,7 +330,7 @@
   IF (v_pendingtorelease > 0) THEN
     RAISE_APPLICATION_ERROR(-20000, '@CannotConsumeAllStock@');
   END IF;
-
-END M_RESERVATION_CONSUMPTION]]></body>
+END M_RESERVATION_CONSUMPTION
+]]></body>
     </function>
   </database>
--- a/src-db/database/model/functions/M_RESERVATION_POST.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/functions/M_RESERVATION_POST.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -33,7 +33,7 @@
   v_Message         VARCHAR2(2000):='';
   v_reservation_id  VARCHAR2(32);
   v_user_id         VARCHAR2(32);
-  v_Result          NUMBER:=1; --  Success
+  v_Result NUMBER:=1; --  Success
   v_resaction       VARCHAR2(60);
   v_resstatus       VARCHAR2(60);
   v_newstatus       VARCHAR2(60);
@@ -87,7 +87,7 @@
     v_newaction := 'HO';
     
     -- ADD RESERVED STOCK
-    M_RESERVE_STOCK_AUTO (v_reservation_id, v_user_id, v_message);
+    M_RESERVE_STOCK_AUTO(v_reservation_id, v_user_id, v_message);
 
   ELSIF (v_resaction = 'HO') THEN
   /*
--- a/src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -129,6 +129,7 @@
 
   p_reservedqty := v_reserveqty - v_pendingqty;
   RETURN;
-END M_RESERVE_STOCK_AUTO]]></body>
+END M_RESERVE_STOCK_AUTO
+]]></body>
     </function>
   </database>
--- a/src-db/database/model/functions/M_RESERVE_STOCK_MANUAL.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/functions/M_RESERVE_STOCK_MANUAL.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -91,6 +91,7 @@
 
   p_reservation_stock_id := v_reservation_stock_id;
   RETURN ;
-END M_RESERVE_STOCK_MANUAL]]></body>
+END M_RESERVE_STOCK_MANUAL
+]]></body>
     </function>
   </database>
--- a/src-db/database/model/triggers/M_RESERVATION_STOCK_TRG.xml	Thu Oct 25 11:35:57 2012 +0200
+++ b/src-db/database/model/triggers/M_RESERVATION_STOCK_TRG.xml	Thu Oct 25 17:20:43 2012 +0200
@@ -19,8 +19,8 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
-  v_reservedqtydiff     NUMBER :=0;
-  v_releasedqtydiff     NUMBER :=0;
+  v_reservedqtydiff NUMBER :=0;
+  v_releasedqtydiff NUMBER :=0;
   v_reservation_id      VARCHAR2(32);
 BEGIN
   IF (AD_isTriggerEnabled()='N') THEN