Backout of the changeset e2817093d0b8. Fix for issue 19492.
authorIoritz Cia <ioritz.cia@openbravo.com>
Thu, 16 Feb 2012 11:10:40 +0100
changeset 15518 8fd83eb63b97
parent 15517 4561e31e98e3
child 15519 b5a6f2188265
Backout of the changeset e2817093d0b8. Fix for issue 19492.
Rescheduled for later.
src-db/database/model/triggers/C_PROJECT_TRG.xml
src-db/database/model/triggers/M_PRODUCT_TRG.xml
src-db/database/model/triggers/M_WAREHOUSE_TRG.xml
--- a/src-db/database/model/triggers/C_PROJECT_TRG.xml	Wed Feb 15 20:33:15 2012 +0100
+++ b/src-db/database/model/triggers/C_PROJECT_TRG.xml	Thu Feb 16 11:10:40 2012 +0100
@@ -31,7 +31,6 @@
     ************************************************************************/
     v_Tree_ID VARCHAR2(32);
   v_Parent_ID VARCHAR2(32);
-    v_count NUMBER;
   --
   TYPE RECORD IS REF CURSOR;
     Cur_Defaults RECORD;
@@ -111,19 +110,8 @@
       )
       ;
     ELSIF (UPDATING) THEN
-
-      IF(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0')) THEN 
-        SELECT COUNT(*) INTO V_COUNT FROM C_PROJECTLINE WHERE C_PROJECT_ID = :NEW.C_PROJECT_ID;
-        IF(V_COUNT > 0) THEN
-          SELECT COUNT(*) INTO V_COUNT FROM C_PROJECTLINE WHERE C_PROJECT_ID = :NEW.C_PROJECT_ID AND AD_ISORGINCLUDED(:NEW.AD_ORG_ID,AD_ORG_ID,:NEW.AD_CLIENT_ID) <> -1;
-          IF(V_COUNT = 0) THEN
-            RAISE_APPLICATION_ERROR(-20000, '@orgnizationHeaderCheck@') ;
-          END IF;
-        END IF;
-      END IF;
-    
-      UPDATE C_PROJECT_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
-      WHERE C_PROJECT_ID = :new.C_PROJECT_ID;
+     UPDATE C_PROJECT_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
+     WHERE C_PROJECT_ID = :new.C_PROJECT_ID;
     END IF;
     -- Summary Nodes first
 EXCEPTION
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Wed Feb 15 20:33:15 2012 +0100
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Thu Feb 16 11:10:40 2012 +0100
@@ -48,16 +48,6 @@
     END IF;
 
  IF (UPDATING) THEN
-  IF(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0')) THEN 
-    SELECT COUNT(*) INTO V_COUNT FROM M_PRODUCTPRICE WHERE M_PRODUCT_ID = :NEW.M_PRODUCT_ID;
-    IF(V_COUNT > 0) THEN
-      SELECT COUNT(*) INTO V_COUNT FROM M_PRODUCTPRICE WHERE M_PRODUCT_ID = :NEW.M_PRODUCT_ID AND AD_ISORGINCLUDED(:NEW.AD_ORG_ID,AD_ORG_ID,:NEW.AD_CLIENT_ID) <> -1;
-      IF(V_COUNT = 0) THEN
-        RAISE_APPLICATION_ERROR(-20000, '@orgnizationHeaderCheck@') ;
-      END IF;
-    END IF;
-  END IF;
- 
   UPDATE M_PRODUCT_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
   WHERE M_PRODUCT_ID = :new.M_PRODUCT_ID;
   
--- a/src-db/database/model/triggers/M_WAREHOUSE_TRG.xml	Wed Feb 15 20:33:15 2012 +0100
+++ b/src-db/database/model/triggers/M_WAREHOUSE_TRG.xml	Thu Feb 16 11:10:40 2012 +0100
@@ -28,7 +28,6 @@
 
   TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
-  v_count NUMBER;
     
 BEGIN
     
@@ -72,16 +71,6 @@
         ;
     END LOOP;
   ELSIF (UPDATING) THEN
-    IF(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0')) THEN 
-      SELECT COUNT(*) INTO V_COUNT FROM M_LOCATOR WHERE M_WAREHOUSE_ID = :NEW.M_WAREHOUSE_ID;
-      IF(V_COUNT > 0) THEN
-        SELECT COUNT(*) INTO V_COUNT FROM M_LOCATOR WHERE M_WAREHOUSE_ID = :NEW.M_WAREHOUSE_ID AND AD_ISORGINCLUDED(:NEW.AD_ORG_ID,AD_ORG_ID,:NEW.AD_CLIENT_ID) <> -1;
-        IF(V_COUNT = 0) THEN
-          RAISE_APPLICATION_ERROR(-20000, '@orgnizationHeaderCheck@') ;
-        END IF;
-      END IF;
-    END IF;
-
     UPDATE M_WAREHOUSE_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
     WHERE M_WAREHOUSE_ID = :new.M_WAREHOUSE_ID;
   END IF;