removed unused triggers for impformats since they don't have modules anymore
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 20 Jan 2009 15:55:55 +0000
changeset 2665 f5980840d441
parent 2664 e59193f0d634
child 2666 6dea260c0260
removed unused triggers for impformats since they don't have modules anymore
src-db/database/model/triggers/AD_IMPFORMAT_MOD_TRG.xml
src-db/database/model/triggers/AD_IMPFORMAT_ROW_MOD_TRG.xml
--- a/src-db/database/model/triggers/AD_IMPFORMAT_MOD_TRG.xml	Tue Jan 20 15:46:40 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER AD_IMPFORMAT_MOD_TRG">
-    <trigger name="AD_IMPFORMAT_MOD_TRG" table="AD_IMPFORMAT" fires="before" insert="true" update="true" delete="true" foreach="row">
-      <body><![CDATA[
-
-/*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License.
-* The Original Code is Openbravo ERP.
-* The Initial Developer of the Original Code is Openbravo SL
-* All portions are Copyright (C) 2008 Openbravo SL
-* All Rights Reserved.
-* Contributor(s):  ______________________________________.
-************************************************************************/
-  devTemplate NUMBER;
-  devModule   CHAR(1);
-  cuerrentID  VARCHAR2(32);
-  cuerrentModuleID  VARCHAR2(32);
-    
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-
-  SELECT COUNT(*)
-    INTO devTemplate
-    FROM AD_MODULE
-   WHERE IsInDevelopment = 'Y'
-     AND Type = 'T';
-     
-  IF (UPDATING OR INSERTING) THEN
-    cuerrentID := :new.AD_ImpFormat_ID;
-    cuerrentModuleID := :new.AD_Module_ID;
-  ELSE
-    cuerrentID := :old.AD_ImpFormat_ID;
-    cuerrentModuleID := :old.AD_Module_ID;
-  END IF;
-  
-  SELECT M.IsInDevelopment
-    INTO devModule
-    FROM AD_MODULE M
-   WHERE M.AD_MODULE_ID = cuerrentModuleID;
-     
-  IF (UPDATING AND devTemplate=0 AND devModule='N') THEN
-    IF (
-        COALESCE(:NEW.AD_Client_ID , '.') != COALESCE(:OLD.AD_Client_ID , '.') OR
-        COALESCE(:NEW.AD_Org_ID , '.') != COALESCE(:OLD.AD_Org_ID , '.') OR
-        COALESCE(:NEW.IsActive , '.') != COALESCE(:OLD.IsActive , '.') OR
-        COALESCE(:NEW.Name , '.') != COALESCE(:OLD.Name , '.') OR
-        COALESCE(:NEW.Description , '.') != COALESCE(:OLD.Description , '.') OR
-        COALESCE(:NEW.AD_Table_ID , '.') != COALESCE(:OLD.AD_Table_ID , '.') OR
-        COALESCE(:NEW.FormatType , '.') != COALESCE(:OLD.FormatType , '.') OR
-        COALESCE(:NEW.Processing , '.') != COALESCE(:OLD.Processing , '.') OR
-        COALESCE(:NEW.AD_Module_ID , '.') != COALESCE(:OLD.AD_Module_ID , '.') OR
-        1=2) THEN
-      RAISE_APPLICATION_ERROR(-20532, 'Cannot update an object in a module not in developement and without an active template');
-    END IF;
-  END IF;
-  
-  IF ((DELETING OR INSERTING) AND devModule='N') THEN
-    RAISE_APPLICATION_ERROR(-20533, 'Cannot insert/delete objects in a module not in development.');
-  END IF;
-END AD_IMPFORMAT_MOD_TRG
-]]></body>
-    </trigger>
-  </database>
--- a/src-db/database/model/triggers/AD_IMPFORMAT_ROW_MOD_TRG.xml	Tue Jan 20 15:46:40 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER AD_IMPFORMAT_ROW_MOD_TRG">
-    <trigger name="AD_IMPFORMAT_ROW_MOD_TRG" table="AD_IMPFORMAT_ROW" fires="before" insert="true" update="true" delete="true" foreach="row">
-      <body><![CDATA[
-
-/*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License.
-* The Original Code is Openbravo ERP.
-* The Initial Developer of the Original Code is Openbravo SL
-* All portions are Copyright (C) 2008 Openbravo SL
-* All Rights Reserved.
-* Contributor(s):  ______________________________________.
-************************************************************************/
-  devTemplate NUMBER;
-  devModule   CHAR(1);
-  cuerrentID  VARCHAR2(32);
-  cuerrentModuleID  VARCHAR2(32);
-    
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-
-  SELECT COUNT(*)
-    INTO devTemplate
-    FROM AD_MODULE
-   WHERE IsInDevelopment = 'Y'
-     AND Type = 'T';
-     
-  IF (UPDATING OR INSERTING) THEN
-    cuerrentID := :new.AD_ImpFormat_Row_ID;
-    cuerrentModuleID := :new.AD_ImpFormat_ID;
-  ELSE
-    cuerrentID := :old.AD_ImpFormat_Row_ID;
-    cuerrentModuleID := :old.AD_ImpFormat_ID;
-  END IF;
-  
-   
-  SELECT M.IsInDevelopment
-    INTO devModule
-    FROM AD_MODULE M, AD_IMPFORMAT I
-   WHERE M.AD_MODULE_ID = I.AD_MODULE_ID
-     AND I.AD_IMPFORMAT_ID = cuerrentModuleID;
-     
-  IF (UPDATING AND devTemplate=0 AND devModule='N') THEN
-    IF (
-        COALESCE(:NEW.AD_Client_ID , '.') != COALESCE(:OLD.AD_Client_ID , '.') OR
-        COALESCE(:NEW.AD_Org_ID , '.') != COALESCE(:OLD.AD_Org_ID , '.') OR
-        COALESCE(:NEW.IsActive , '.') != COALESCE(:OLD.IsActive , '.') OR
-        COALESCE(:NEW.AD_ImpFormat_ID , '.') != COALESCE(:OLD.AD_ImpFormat_ID , '.') OR
-        COALESCE(:NEW.SeqNo , 0) != COALESCE(:OLD.SeqNo , 0) OR
-        COALESCE(:NEW.Name , '.') != COALESCE(:OLD.Name , '.') OR
-        COALESCE(:NEW.AD_Column_ID , '.') != COALESCE(:OLD.AD_Column_ID , '.') OR
-        COALESCE(:NEW.StartNo , 0) != COALESCE(:OLD.StartNo , 0) OR
-        COALESCE(:NEW.EndNo , 0) != COALESCE(:OLD.EndNo , 0) OR
-        COALESCE(:NEW.DataType , '.') != COALESCE(:OLD.DataType , '.') OR
-        COALESCE(:NEW.DataFormat , '.') != COALESCE(:OLD.DataFormat , '.') OR
-        COALESCE(:NEW.DecimalPoint , '.') != COALESCE(:OLD.DecimalPoint , '.') OR
-        COALESCE(:NEW.DivideBy100 , '.') != COALESCE(:OLD.DivideBy100 , '.') OR
-        COALESCE(:NEW.ConstantValue , '.') != COALESCE(:OLD.ConstantValue , '.') OR
-        COALESCE(:NEW.Callout , '.') != COALESCE(:OLD.Callout , '.') OR
-        COALESCE(:NEW.Script , '.') != COALESCE(:OLD.Script , '.') OR
-        1=2) THEN
-      RAISE_APPLICATION_ERROR(-20532, 'Cannot update an object in a module not in developement and without an active template');
-    END IF;
-  END IF;
-  
-  IF ((DELETING OR INSERTING) AND devModule='N') THEN
-    RAISE_APPLICATION_ERROR(-20533, 'Cannot insert/delete objects in a module not in development.');
-  END IF;
-END AD_IMPFORMAT_ROW_MOD_TRG
-]]></body>
-    </trigger>
-  </database>