Add infrastructure for triggers soft disable
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 24 Nov 2008 12:32:14 +0000
changeset 2078 cf88ca44cdd2
parent 2077 1a0d02e15999
child 2079 370df0f8b4a8
Add infrastructure for triggers soft disable
src-db/database/model/prescript-Oracle.sql
src-db/database/model/prescript-PostgreSql.sql
src-db/database/model/triggers/AD_ACCOUNTINGRPT_ELEMENT_TRG.xml
src-db/database/model/triggers/AD_ALERTRECIPIENT_TRG.xml
src-db/database/model/triggers/AD_ALERTRULE_TRG.xml
src-db/database/model/triggers/AD_AUXILIARINPUT_MOD_TRG.xml
src-db/database/model/triggers/AD_CALLOUT_MOD_TRG.xml
src-db/database/model/triggers/AD_CALLOUT_TRG.xml
src-db/database/model/triggers/AD_CLIENT_TRG.xml
src-db/database/model/triggers/AD_COLUMN_MOD_TRG.xml
src-db/database/model/triggers/AD_COLUMN_TRG.xml
src-db/database/model/triggers/AD_COLUMN_TRG2.xml
src-db/database/model/triggers/AD_DATASET_COLUMN_MOD_TRG.xml
src-db/database/model/triggers/AD_DATASET_MOD_TRG.xml
src-db/database/model/triggers/AD_DATASET_TABLE_MOD_TRG.xml
src-db/database/model/triggers/AD_ELEMENT_MOD_TRG.xml
src-db/database/model/triggers/AD_ELEMENT_TRG.xml
src-db/database/model/triggers/AD_ELEMENT_TRL_TRG.xml
src-db/database/model/triggers/AD_FIELDGROUP_MOD_TRG.xml
src-db/database/model/triggers/AD_FIELDGROUP_TRG.xml
src-db/database/model/triggers/AD_FIELD_MOD_TRG.xml
src-db/database/model/triggers/AD_FIELD_TRG.xml
src-db/database/model/triggers/AD_FORM_MOD_TRG.xml
src-db/database/model/triggers/AD_FORM_TRG.xml
src-db/database/model/triggers/AD_FORM_TRG2.xml
src-db/database/model/triggers/AD_IMPFORMAT_MOD_TRG.xml
src-db/database/model/triggers/AD_IMPFORMAT_ROW_MOD_TRG.xml
src-db/database/model/triggers/AD_MENU_MOD_TRG.xml
src-db/database/model/triggers/AD_MENU_TRG.xml
src-db/database/model/triggers/AD_MESSAGE_MOD_TRG.xml
src-db/database/model/triggers/AD_MESSAGE_TRG.xml
src-db/database/model/triggers/AD_MODEL_OBJECT_MOD_TRG.xml
src-db/database/model/triggers/AD_MODOBJMAPPING_MOD_TRG.xml
src-db/database/model/triggers/AD_MODULE_DBPREFIX_MOD_TRG.xml
src-db/database/model/triggers/AD_MODULE_DBPREFIX_TRG.xml
src-db/database/model/triggers/AD_MODULE_DENPENDENCY_TRG.xml
src-db/database/model/triggers/AD_MODULE_DEPENDENCY_MOD_TRG.xml
src-db/database/model/triggers/AD_MODULE_TRG.xml
src-db/database/model/triggers/AD_ORGTYPE_TRG.xml
src-db/database/model/triggers/AD_ORG_STLE_TRG.xml
src-db/database/model/triggers/AD_ORG_TRG.xml
src-db/database/model/triggers/AD_PACKAGE_MOD_TRG.xml
src-db/database/model/triggers/AD_PROCESS_MOD_TRG.xml
src-db/database/model/triggers/AD_PROCESS_PARA_MOD_TRG.xml
src-db/database/model/triggers/AD_PROCESS_PARA_TRG.xml
src-db/database/model/triggers/AD_PROCESS_REQUEST_TRG.xml
src-db/database/model/triggers/AD_PROCESS_TRG.xml
src-db/database/model/triggers/AD_PROCESS_TRL_TRG.xml
src-db/database/model/triggers/AD_REFERENCE_MOD_TRG.xml
src-db/database/model/triggers/AD_REFERENCE_TRG.xml
src-db/database/model/triggers/AD_REFERENCE_TRG2.xml
src-db/database/model/triggers/AD_REFERENCE_TRG3.xml
src-db/database/model/triggers/AD_REF_LIST_MOD_TRG.xml
src-db/database/model/triggers/AD_REF_LIST_TRG.xml
src-db/database/model/triggers/AD_REF_SEARCH_COLUMN_MOD_TRG.xml
src-db/database/model/triggers/AD_REF_SEARCH_MOD_TRG.xml
src-db/database/model/triggers/AD_REF_TABLE_MOD_TRG.xml
src-db/database/model/triggers/AD_REGISTRATION_INFO_TRG.xml
src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml
src-db/database/model/triggers/AD_ROLE_TRG.xml
src-db/database/model/triggers/AD_SYSTEM_INFO_TRG.xml
src-db/database/model/triggers/AD_SYSTEM_INFO_TRG2.xml
src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml
src-db/database/model/triggers/AD_TABLE_TRG.xml
src-db/database/model/triggers/AD_TAB_MOD_TRG.xml
src-db/database/model/triggers/AD_TAB_TRG.xml
src-db/database/model/triggers/AD_TAB_TRG2.xml
src-db/database/model/triggers/AD_TASK_TRG.xml
src-db/database/model/triggers/AD_TASK_TRG2.xml
src-db/database/model/triggers/AD_TEXTINTERFACES_MOD_TRG.xml
src-db/database/model/triggers/AD_TEXTINTERFACES_TRG.xml
src-db/database/model/triggers/AD_TREENODE_MOD_TRG.xml
src-db/database/model/triggers/AD_TREENODE_TRG.xml
src-db/database/model/triggers/AD_TREE_TRG.xml
src-db/database/model/triggers/AD_VAL_RULE_MOD_TRG.xml
src-db/database/model/triggers/AD_WF_NODENEXT_MOD_TRG.xml
src-db/database/model/triggers/AD_WF_NODE_MOD_TRG.xml
src-db/database/model/triggers/AD_WF_NODE_TRG.xml
src-db/database/model/triggers/AD_WINDOW_MOD_TRG.xml
src-db/database/model/triggers/AD_WINDOW_TRG.xml
src-db/database/model/triggers/AD_WINDOW_TRG2.xml
src-db/database/model/triggers/AD_WINDOW_TRL_TRG.xml
src-db/database/model/triggers/AD_WORKFLOW_MOD_TRG.xml
src-db/database/model/triggers/AD_WORKFLOW_TRG.xml
src-db/database/model/triggers/AT_COMMAND_TRG.xml
src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG.xml
src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG2.xml
src-db/database/model/triggers/A_AMORTIZATION_TRG.xml
src-db/database/model/triggers/A_ASSET_GROUP_TRG.xml
src-db/database/model/triggers/A_ASSET_GROUP_TRG2.xml
src-db/database/model/triggers/A_ASSET_TRG.xml
src-db/database/model/triggers/A_ASSET_TRG2.xml
src-db/database/model/triggers/C_ACCTSCHEMADEL_TRG.xml
src-db/database/model/triggers/C_ACCTSCHEMA_ELEMENT_TRG.xml
src-db/database/model/triggers/C_ACCTSCHEMA_TRG.xml
src-db/database/model/triggers/C_BANKACCOUNTIBAN_TRG.xml
src-db/database/model/triggers/C_BANKACCOUNT_TRG.xml
src-db/database/model/triggers/C_BANKCOUNTRY_TRG.xml
src-db/database/model/triggers/C_BANKSTATEMENTLINE_TRG.xml
src-db/database/model/triggers/C_BANKSTATEMENT_TRG.xml
src-db/database/model/triggers/C_BPARTNER_LOCATION_TRG.xml
src-db/database/model/triggers/C_BPARTNER_TRG.xml
src-db/database/model/triggers/C_BP_BANKACCOUNTIBAN_TRG.xml
src-db/database/model/triggers/C_BP_GROUP_TRG.xml
src-db/database/model/triggers/C_BP_SALCATEGORY_TRG.xml
src-db/database/model/triggers/C_BP_SALCATEGORY_TRG2.xml
src-db/database/model/triggers/C_BSTMTLINE_CHK_RESTRICT_TRG.xml
src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_BUDGETLINE_TRG.xml
src-db/database/model/triggers/C_CASHBOOK_TRG.xml
src-db/database/model/triggers/C_CASHLINE_CHK_RESTRICT_TRG.xml
src-db/database/model/triggers/C_CASHLINE_TRG.xml
src-db/database/model/triggers/C_CASH_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_CASH_TRG.xml
src-db/database/model/triggers/C_CHARGE_TRG.xml
src-db/database/model/triggers/C_COMMISSIONAMT_TRG.xml
src-db/database/model/triggers/C_COMMISSIONDETAIL_TRG.xml
src-db/database/model/triggers/C_CONVERSION_RATE_TRG.xml
src-db/database/model/triggers/C_CONVERSION_RATE_TRG2.xml
src-db/database/model/triggers/C_COUNTRY_TRG.xml
src-db/database/model/triggers/C_CURRENCY_TRG.xml
src-db/database/model/triggers/C_DEBT_PAYMENT_BAL_TRG.xml
src-db/database/model/triggers/C_DEBT_PAYMENT_TRG.xml
src-db/database/model/triggers/C_DOCTYPE_TRG.xml
src-db/database/model/triggers/C_DPMLINE_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_DP_MANAGEMENTLINE_TRG.xml
src-db/database/model/triggers/C_DP_MANAGEMENT_CHK_RESTR_TRG.xml
src-db/database/model/triggers/C_ELEMENTVALUE_TRG.xml
src-db/database/model/triggers/C_GREETING_TRG.xml
src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_INVOICEDISCOUNT_TRG.xml
src-db/database/model/triggers/C_INVOICELINE_TRG.xml
src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
src-db/database/model/triggers/C_INVOICELINE_TRG3.xml
src-db/database/model/triggers/C_INVOICETAX_TRG.xml
src-db/database/model/triggers/C_INVOICETAX_TRG2.xml
src-db/database/model/triggers/C_INVOICE_TRG.xml
src-db/database/model/triggers/C_INVOICE_TRG2.xml
src-db/database/model/triggers/C_INVTAX_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_LOCATION_TRG.xml
src-db/database/model/triggers/C_ORDERLINE2_TRG.xml
src-db/database/model/triggers/C_ORDERLINE_TRG.xml
src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
src-db/database/model/triggers/C_ORDERTAX_TRG.xml
src-db/database/model/triggers/C_ORDER_CHK_RESTRINCTIONS_TRG.xml
src-db/database/model/triggers/C_ORDER_TRG.xml
src-db/database/model/triggers/C_ORDER_TRG2.xml
src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/C_PAYMENTTERM_TRG.xml
src-db/database/model/triggers/C_PERIOD_TRG.xml
src-db/database/model/triggers/C_PERIOD_TRG2.xml
src-db/database/model/triggers/C_PROJECTLINE_TRG.xml
src-db/database/model/triggers/C_PROJECTLINE_TRG2.xml
src-db/database/model/triggers/C_PROJECTPHASE_TRG.xml
src-db/database/model/triggers/C_PROJECTPROPOSALTASK_TRG.xml
src-db/database/model/triggers/C_PROJECT_TRG.xml
src-db/database/model/triggers/C_PROJECT_TRG2.xml
src-db/database/model/triggers/C_PROJECT_TRG3.xml
src-db/database/model/triggers/C_REMITTANCELINE_TRG.xml
src-db/database/model/triggers/C_REMITTANCE_TRG.xml
src-db/database/model/triggers/C_REVENUERECOGNITION_PLAN_TRG.xml
src-db/database/model/triggers/C_SALESREGION_TRG.xml
src-db/database/model/triggers/C_SETTLEMENT_TRG.xml
src-db/database/model/triggers/C_TAXCATEGORY_TRG.xml
src-db/database/model/triggers/C_TAXPAYMENT_TRG.xml
src-db/database/model/triggers/C_TAXREGISTERLINE_TRG.xml
src-db/database/model/triggers/C_TAXREGISTER_TRG.xml
src-db/database/model/triggers/C_TAX_REPORT_TRG.xml
src-db/database/model/triggers/C_TAX_TRG.xml
src-db/database/model/triggers/C_UOM_TRG.xml
src-db/database/model/triggers/C_VALIDCOMBINATION_TRG.xml
src-db/database/model/triggers/C_WITHHOLDING_TRG.xml
src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml
src-db/database/model/triggers/GL_JOURNALLINE_TRG.xml
src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml
src-db/database/model/triggers/GL_JOURNAL_TRG.xml
src-db/database/model/triggers/M_ATTRIBUTEVALUE_TRG.xml
src-db/database/model/triggers/M_INOUTLINE_TRG.xml
src-db/database/model/triggers/M_INOUT_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/M_INOUT_TRG_PROV.xml
src-db/database/model/triggers/M_INTERNAL_CONSUMPTIONLINE_TRG.xml
src-db/database/model/triggers/M_INVENTORYLINE2_TRG.xml
src-db/database/model/triggers/M_INVENTORYLINE_TRG.xml
src-db/database/model/triggers/M_INVENTORY_TRG.xml
src-db/database/model/triggers/M_IOLINE_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/M_MATCHPO_TRG.xml
src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml
src-db/database/model/triggers/M_MOVEMENT_TRG.xml
src-db/database/model/triggers/M_PRODUCTIONLINE_TRG.xml
src-db/database/model/triggers/M_PRODUCTIONPLAN_TRG.xml
src-db/database/model/triggers/M_PRODUCTION_TRG.xml
src-db/database/model/triggers/M_PRODUCT_BOM_TRG.xml
src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml
src-db/database/model/triggers/M_PRODUCT_TRG.xml
src-db/database/model/triggers/M_RAPPEL_INVOICE_TRG.xml
src-db/database/model/triggers/M_REQUISITIONLINE_TRG.xml
src-db/database/model/triggers/M_REQUISITIONORDER_TRG.xml
src-db/database/model/triggers/M_REQUISITION_TRG.xml
src-db/database/model/triggers/M_TRANSACTION_TRG.xml
src-db/database/model/triggers/M_WAREHOUSE_TRG.xml
src-db/database/model/triggers/S_EXPENSETYPE_TRG.xml
src-db/database/model/triggers/S_RESOURCEASSIGNMENT_TRG.xml
src-db/database/model/triggers/S_RESOURCETYPE_TRG.xml
src-db/database/model/triggers/S_RESOURCEUNAVAILABLE_TRG.xml
src-db/database/model/triggers/S_RESOURCE_TRG.xml
src-db/database/model/triggers/S_TIMEEXPENSELINE_TRG.xml
src-db/database/model/triggers/S_TIMEEXPENSE_TRG.xml
--- a/src-db/database/model/prescript-Oracle.sql	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/prescript-Oracle.sql	Mon Nov 24 12:32:14 2008 +0000
@@ -10,7 +10,20 @@
 End;
 /-- END
 
+Begin  
+  execute immediate 'Drop table AD_ENABLE_TRIGGERS';
+  Exception when others then null;
+End;
+/-- END
+
  -- create temporary tables
+
+ CREATE GLOBAL TEMPORARY TABLE AD_ENABLE_TRIGGERS
+ (
+   ISENABLED CHAR(1)             NOT NULL
+ )
+  ON COMMIT PRESERVE ROWS
+/-- END 
  CREATE GLOBAL TEMPORARY TABLE C_TEMP_SELECTION
  (
    C_TEMP_SELECTION_ID  VARCHAR2(32 BYTE)             NOT NULL,
--- a/src-db/database/model/prescript-PostgreSql.sql	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/prescript-PostgreSql.sql	Mon Nov 24 12:32:14 2008 +0000
@@ -1287,6 +1287,13 @@
 $BODY$ 
 BEGIN
  -- create temporary tables
+ drop table if exists AD_ENABLE_TRIIGERS;
+ CREATE GLOBAL TEMPORARY TABLE AD_ENABLE_TRIGGERS
+ (
+   ISENABLED CHARACTER(1)             NOT NULL
+ )
+  ON COMMIT PRESERVE ROWS
+
  drop table if exists C_TEMP_SELECTION;
  CREATE GLOBAL TEMPORARY TABLE C_TEMP_SELECTION
  (
@@ -1307,4 +1314,4 @@
 END;
 $BODY$
   LANGUAGE 'plpgsql' VOLATILE
-/-- END
\ No newline at end of file
+/-- END
--- a/src-db/database/model/triggers/AD_ACCOUNTINGRPT_ELEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ACCOUNTINGRPT_ELEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_xTree_ID VARCHAR2(32);
   v_xParent_ID VARCHAR2(32);
   v_NextNo     VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Menu Trigger
   --  for Translation
   --  and TreeNode
--- a/src-db/database/model/triggers/AD_ALERTRECIPIENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ALERTRECIPIENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
       n NUMBER;
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
    IF INSERTING or UPDATING THEN
      select count(*)
--- a/src-db/database/model/triggers/AD_ALERTRULE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ALERTRULE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
       TYPE RECORD IS REF CURSOR;
       Cur_Role RECORD;
       recipient_ID VARCHAR2(32);
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
     IF INSERTING THEN
       -- insert translations
--- a/src-db/database/model/triggers/AD_AUXILIARINPUT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_AUXILIARINPUT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_CALLOUT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_CALLOUT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_CALLOUT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_CALLOUT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_ID_MAP     VARCHAR2(32) ;
   v_WindowName VARCHAR2(60) ;
   v_ClassName  VARCHAR2(60) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING) THEN
     IF(NOT(COALESCE(:old.Name, '.') <> COALESCE(:NEW.Name, '.')
    OR COALESCE(:old.IsActive, '.') <> COALESCE(:NEW.IsActive, '.')))
--- a/src-db/database/model/triggers/AD_CLIENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_CLIENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
     TYPE RECORD IS REF CURSOR;
   CUR_DSequence RECORD;
   v_NextNo VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- See also: AD_Sequence_Check
   FOR CUR_DSequence IN
     (
--- a/src-db/database/model/triggers/AD_COLUMN_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_COLUMN_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_COLUMN_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_COLUMN_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
     * Description:
     *   Syncronize Name, .. with Field, if centrally maintained
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     /**
     * Sync Names
     *  - Buttons are updated directly
--- a/src-db/database/model/triggers/AD_COLUMN_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_COLUMN_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   v_TableName VARCHAR2(40);
   v_NextNo VARCHAR2(32);
   v_Aux NUMBER;
-  BEGIN
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT count(*)
     INTO v_Aux
     FROM AD_TABLE T, 
--- a/src-db/database/model/triggers/AD_DATASET_COLUMN_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_DATASET_COLUMN_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_DATASET_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_DATASET_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_DATASET_TABLE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_DATASET_TABLE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_ELEMENT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ELEMENT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_ELEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ELEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *  synchronize PrintInfo
     *  reset Translation flag
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_Element Trigger
     IF INSERTING
     THEN
--- a/src-db/database/model/triggers/AD_ELEMENT_TRL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ELEMENT_TRL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
 * Description:
 *   Synchronize name,... with  Field if centrally maintained
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING
   THEN
     IF (   COALESCE (:OLD.NAME, '.') <> COALESCE (:NEW.NAME, '.')
--- a/src-db/database/model/triggers/AD_FIELDGROUP_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FIELDGROUP_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_FIELDGROUP_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FIELDGROUP_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     * Insert AD_Menu Trigger
     *  for Translation
     */
-    BEGIN   IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+   IF INSERTING
     THEN
     --  Create Translation Row
   INSERT
--- a/src-db/database/model/triggers/AD_FIELD_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FIELD_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_FIELD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FIELD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     * Insert AD_Field Trigger
     *  for Translation
     */
-    BEGIN  IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF INSERTING
     THEN
       INSERT
       INTO AD_Field_Trl
--- a/src-db/database/model/triggers/AD_FORM_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FORM_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_FORM_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FORM_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
     *  for Translation
     *  Access
     */
-    BEGIN   IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+   IF INSERTING
     THEN
   INSERT
   INTO AD_Form_Trl
--- a/src-db/database/model/triggers/AD_FORM_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_FORM_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_ID_MAP     VARCHAR2(32) ;
   v_WindowName VARCHAR2(60):='ad_forms';
   v_ClassName  VARCHAR2(60) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING) THEN
     IF NOT(COALESCE(:old.NAME, '.') <> COALESCE(:NEW.NAME, '.')
    OR COALESCE(:old.IsActive, '.') <> COALESCE(:NEW.IsActive, '.')
--- a/src-db/database/model/triggers/AD_IMPFORMAT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_IMPFORMAT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_IMPFORMAT_ROW_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_IMPFORMAT_ROW_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MENU_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MENU_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MENU_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MENU_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
   v_xTree_ID VARCHAR2(32);
   v_xParent_ID VARCHAR2(32);
   v_NextNo     VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Menu Trigger
   --  for Translation
   --  and TreeNode
--- a/src-db/database/model/triggers/AD_MESSAGE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MESSAGE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MESSAGE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MESSAGE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
 * Description:
 ************************************************************************/
  v_aux NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF :new.AD_Module_ID != '0' THEN
     SELECT COUNT(*)
       INTO v_Aux
--- a/src-db/database/model/triggers/AD_MODEL_OBJECT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODEL_OBJECT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
   v_AD_FORM_ID      VARCHAR2(32);
   v_AD_REFERENCE_ID VARCHAR2(32);
   v_AD_CALLOUT_ID   VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
      null;
      /* Mutating tables....
--- a/src-db/database/model/triggers/AD_MODOBJMAPPING_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODOBJMAPPING_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
   v_AD_FORM_ID      VARCHAR2(32);
   v_AD_REFERENCE_ID VARCHAR2(32);
   v_AD_CALLOUT_ID   VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     null;
     /*  mutating tables...
   IF (UPDATING OR INSERTING) THEN
--- a/src-db/database/model/triggers/AD_MODULE_DBPREFIX_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODULE_DBPREFIX_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MODULE_DBPREFIX_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODULE_DBPREFIX_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
   V_Char char;
   v_isregistered char(1);
   v_old_name varchar(60);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
    SELECT IsRegistered
    INTO v_IsRegistered
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MODULE_DENPENDENCY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODULE_DENPENDENCY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -20,7 +20,13 @@
   ************************************************************************/
   v_Type CHAR(1);
   v_name VARCHAR2(60);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT Type
     INTO v_Type
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MODULE_DEPENDENCY_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODULE_DEPENDENCY_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_MODULE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_MODULE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
   * Contributor(s):  ______________________________________.
   ************************************************************************/
   V_Char char;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
    --Tranlsation management
    IF INSERTING THEN
     --  Create Translation Row
--- a/src-db/database/model/triggers/AD_ORGTYPE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ORGTYPE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_num NUMBER; 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(AD_Org.AD_Org_ID)
   INTO v_num
   FROM AD_Org
--- a/src-db/database/model/triggers/AD_ORG_STLE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ORG_STLE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_num NUMBER; 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT AD_ORG_CHK_CALENDAR() INTO v_num FROM DUAL;
   IF (v_num = -3) THEN
     RAISE_APPLICATION_ERROR(-20537, 'Every legal entity must have itself or an ancestor at least a calendar attached to it');
--- a/src-db/database/model/triggers/AD_ORG_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ORG_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   TYPE RECORD IS REF CURSOR;
     CUR_PeriodControl RECORD;
   
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     -- Add to all roles of the client
     INSERT
--- a/src-db/database/model/triggers/AD_PACKAGE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PACKAGE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_PROCESS_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_PROCESS_PARA_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_PARA_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_PROCESS_PARA_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_PARA_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
 * Description:
 *   Translation
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Process_Para Trigger
   --  for Translation
   IF (INSERTING)
--- a/src-db/database/model/triggers/AD_PROCESS_REQUEST_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_REQUEST_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -20,7 +20,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 IF (:OLD.STATUS = 'Scheduled') THEN
   RAISE_APPLICATION_ERROR(-20630,'Unable to delete Process Request whilst still scheduled.');
 END IF;
--- a/src-db/database/model/triggers/AD_PROCESS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
 *   Synchronize Names and Translation
 *   Sync IsActive with Menu / Field
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Process Trigger
   --  for Translation
   --  add Access
--- a/src-db/database/model/triggers/AD_PROCESS_TRL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_PROCESS_TRL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 * AD_Process_Trl update trigger
 *  synchronize name,... with  Field if centrally maintained
 */
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING
   THEN
     IF (   COALESCE (:OLD.NAME, '.') <> COALESCE (:NEW.NAME, '.')
--- a/src-db/database/model/triggers/AD_REFERENCE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REFERENCE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_REFERENCE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REFERENCE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
 * file and version.
 *************************************************************************
 */
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Reference Trigger
   --  for Translation
   IF INSERTING
--- a/src-db/database/model/triggers/AD_REFERENCE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REFERENCE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
  v_ID_MAP      VARCHAR2(32);
  v_WindowName     VARCHAR2(60):= 'info';
  v_ClassName     VARCHAR2(60);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (UPDATING) THEN
     IF NOT((COALESCE(:old.NAME,'.')<>COALESCE(:NEW.NAME,'.')
    OR COALESCE(:old.VALIDATIONTYPE,'.')<>COALESCE(:NEW.VALIDATIONTYPE,'.')
--- a/src-db/database/model/triggers/AD_REFERENCE_TRG3.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REFERENCE_TRG3.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
  
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
  IF :new.AD_Module_ID != '0' AND :new.ValidationType NOT IN ('L', 'T') THEN
     RAISE_APPLICATION_ERROR(-20535, 'Only Table and List references are allowed in modules') ;
  END IF;
--- a/src-db/database/model/triggers/AD_REF_LIST_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REF_LIST_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_REF_LIST_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REF_LIST_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     * Title: Ref List Translation
     * Description:
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_Ref_List Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/AD_REF_SEARCH_COLUMN_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REF_SEARCH_COLUMN_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_REF_SEARCH_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REF_SEARCH_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_REF_TABLE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REF_TABLE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_REGISTRATION_INFO_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_REGISTRATION_INFO_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -20,7 +20,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_Count NUMBER:= 0;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
   SELECT COUNT(*) INTO v_Count FROM AD_REGISTRATION_INFO;
   IF (v_Count <> 0) THEN
--- a/src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -34,7 +34,13 @@
   v_ClientList VARCHAR2(2000):='';
   v_OrgList    VARCHAR2(2000):='';
   v_Client_ID VARCHAR2(32):=-1;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- For each Role
   FOR CUR_Role IN
     (SELECT *  FROM AD_Role  FOR UPDATE)
--- a/src-db/database/model/triggers/AD_ROLE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_ROLE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
 * - Create Role_OrgAccess + User_Roles
 * - Insert Access for Role
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 IF (UPDATING) THEN
  IF NOT(COALESCE(:OLD.UserLevel,'.')<>COALESCE(:NEW.UserLevel,'.')) THEN
   RETURN;
--- a/src-db/database/model/triggers/AD_SYSTEM_INFO_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_SYSTEM_INFO_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -20,7 +20,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_Count NUMBER:= 0;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
   SELECT COUNT(*) INTO v_Count FROM AD_SYSTEM_INFO;
   IF (v_Count <> 0) THEN
--- a/src-db/database/model/triggers/AD_SYSTEM_INFO_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_SYSTEM_INFO_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
 indTempName NVARCHAR2(50) := 'System Customization';
 indTempPackage NVARCHAR2(50) := 'mySystem.CustomizationTemplate';
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   If :old.customization_Allowed='N' and :new.customization_Allowed='Y' then
   
     select count(*) into exist
--- a/src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_TABLE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TABLE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
 ************************************************************************/
   v_Aux NUMBER;
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT M.AD_MODULE_ID
     INTO cuerrentModuleID
     FROM AD_MODULE M, AD_PACKAGE P
--- a/src-db/database/model/triggers/AD_TAB_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TAB_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_TAB_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TAB_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
     * Specifically, this derivative work is based upon the following Compiere
     * file and version.
     *************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_Tab Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/AD_TAB_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TAB_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
  v_IsActive      CHAR(1) := 'Y';
  v_Count       NUMBER(10);
  v_JavaPackage VARCHAR2(315);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (UPDATING) THEN
     IF NOT((COALESCE(:old.NAME,'.')<>COALESCE(:NEW.NAME,'.') OR COALESCE(:old.IsActive,'.')<>COALESCE(:NEW.IsActive,'.'))) THEN
       RETURN;
--- a/src-db/database/model/triggers/AD_TASK_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TASK_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
     *************************************************************************
     * Insert Translation
     */
-    BEGIN  IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF INSERTING
     THEN
     --  Create Translation Row
   INSERT
--- a/src-db/database/model/triggers/AD_TASK_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TASK_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_ID_MAP     VARCHAR2(32) ;
   v_WindowName VARCHAR2(60):='ad_tasks';
   v_ClassName  VARCHAR2(60) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING) THEN
     IF NOT((COALESCE(:old.CLASSNAME, '.') <> COALESCE(:NEW.CLASSNAME, '.')
    OR COALESCE(:old.IsActive, '.') <> COALESCE(:NEW.IsActive, '.')))
--- a/src-db/database/model/triggers/AD_TEXTINTERFACES_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TEXTINTERFACES_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_TEXTINTERFACES_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TEXTINTERFACES_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_TEXTINTERFACES Trigger
   --  for Translation
   IF INSERTING
--- a/src-db/database/model/triggers/AD_TREENODE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TREENODE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
   currentTree VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 --Take into account just updates, because insertions and deletions are done
 --by automatic processes
--- a/src-db/database/model/triggers/AD_TREENODE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TREENODE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   v_EqualAcctSchema NUMBER;
   v_TreeType VARCHAR2(2);
   v_IsReady AD_ORG.ISREADY%TYPE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Verify correct Account Schema for Accounting Reports
   IF (INSERTING OR UPDATING) THEN
 
--- a/src-db/database/model/triggers/AD_TREE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_TREE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     */
   v_NextNo VARCHAR2(32);
   v_Tree_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Insert into TreeNode
   INSERT
   INTO AD_TreeNode
--- a/src-db/database/model/triggers/AD_VAL_RULE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_VAL_RULE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_WF_NODENEXT_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WF_NODENEXT_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_WF_NODE_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WF_NODE_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_WF_NODE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WF_NODE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * file and version.
     *************************************************************************
     */
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_WF_Node Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/AD_WINDOW_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WINDOW_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_WINDOW_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WINDOW_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
     *   - Sync Name (Workflow, Menu)
     *   - Active State (Menu)
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_Window Trigger
     --  for Translation
     --  Access
--- a/src-db/database/model/triggers/AD_WINDOW_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WINDOW_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     TYPE RECORD IS REF CURSOR;
   CUR_DATA RECORD;
   v_JavaPackage VARCHAR2(60);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF((COALESCE(:old.Name, '.') <> COALESCE(:NEW.Name, '.')
   OR COALESCE(:old.IsActive, '.') <> COALESCE(:NEW.IsActive, '.')
   OR COALESCE(:old.AD_Module_ID,'.') <> COALESCE(:new.AD_Module_ID,'.')))
--- a/src-db/database/model/triggers/AD_WINDOW_TRL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WINDOW_TRL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
     * Description:
     *   - Update Translation in Menu + Workflow
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
       IF UPDATING THEN
        IF(COALESCE(:old.Name, '.') <> COALESCE(:NEW.Name, '.')
        OR COALESCE(:old.Description, '.') <> COALESCE(:NEW.Description, '.')
--- a/src-db/database/model/triggers/AD_WORKFLOW_MOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WORKFLOW_MOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   devModule   CHAR(1);
   cuerrentID  VARCHAR2(32);
   cuerrentModuleID  VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
     INTO devTemplate
     FROM AD_MODULE
--- a/src-db/database/model/triggers/AD_WORKFLOW_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AD_WORKFLOW_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * file and version.
     *************************************************************************
     */
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AD_Workflow Trigger
     --  for Translation
     --  Access
--- a/src-db/database/model/triggers/AT_COMMAND_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/AT_COMMAND_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert AT_Command Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_Processed CHAR(1) ;
   v_Posted CHAR(1) ;
   v_AmortizationID varchar2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- ReadOnly Check
   IF (UPDATING OR INSERTING) THEN
     v_AmortizationID := :NEW.A_Amortization_ID;
--- a/src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_AMORTIZATIONLINE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -6,7 +6,13 @@
 
 
 
-  BEGIN null;
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+ null;
 /* mutating table
   update a_asset
   set DepreciatedPlan=(select sum(AmortizationAmt)
--- a/src-db/database/model/triggers/A_AMORTIZATION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_AMORTIZATION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     * Title: Check in deleting, invoice not processed
     ************************************************************************/
     v_DateNull DATE := TO_DATE('31-12-9999','DD-MM-YYYY');
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- If invoice is processed, is not allowed to change C_BPartner
     IF UPDATING
     THEN  if((:OLD.Processed='Y'
--- a/src-db/database/model/triggers/A_ASSET_GROUP_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_ASSET_GROUP_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -20,7 +20,13 @@
 ************************************************************************/
     TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   FOR Cur_Defaults IN
     (
     SELECT *
--- a/src-db/database/model/triggers/A_ASSET_GROUP_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_ASSET_GROUP_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
     * All Rights Reserved.
     * Contributor(s):  ______________________________________.
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   DELETE FROM A_Asset_Group_Acct  WHERE A_Asset_Group_ID=:old.A_Asset_Group_ID;
 END A_ASSET_GROUP_TRG2
 ]]></body>
--- a/src-db/database/model/triggers/A_ASSET_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_ASSET_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
   TYPE RECORD IS REF CURSOR;
   v_Acct_ID VARCHAR2(32);
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Default Accounts for all AcctSchema
   IF(INSERTING) THEN
      FOR Cur_Defaults IN (SELECT *
--- a/src-db/database/model/triggers/A_ASSET_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/A_ASSET_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   DELETE FROM A_Asset_Acct  WHERE A_Asset_ID=:old.A_Asset_ID;
 END A_ASSET_TRG2
 ]]></body>
--- a/src-db/database/model/triggers/C_ACCTSCHEMADEL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ACCTSCHEMADEL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   DELETE FROM C_ACCTSCHEMA_TABLE WHERE C_ACCTSCHEMA_ID=:old.C_ACCTSCHEMA_ID;
 END C_ACCTSCHEMADEL_TRG
 ]]></body>
--- a/src-db/database/model/triggers/C_ACCTSCHEMA_ELEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ACCTSCHEMA_ELEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
     * when element becomes mandatory
     **/
     v_UpdateIt BOOLEAN:=FALSE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Do we have to update
   IF(INSERTING OR UPDATING) THEN
     IF(:new.IsMandatory='Y') THEN
--- a/src-db/database/model/triggers/C_ACCTSCHEMA_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ACCTSCHEMA_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   TYPE RECORD IS REF CURSOR;
   cur_tables RECORD;
   v_AcctSchema_Table_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   FOR cur_tables IN
     (
     SELECT AD_Table.AD_Table_ID as id,
--- a/src-db/database/model/triggers/C_BANKACCOUNTIBAN_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BANKACCOUNTIBAN_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   v_CountryId NVARCHAR2(2);
   v_BankName NVARCHAR2(60);
   v_Length NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Default Accounts for all AcctSchema
   IF(INSERTING OR UPDATING) THEN
     SELECT NAME
--- a/src-db/database/model/triggers/C_BANKACCOUNT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BANKACCOUNT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     ************************************************************************/
     TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/C_BANKCOUNTRY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BANKCOUNTRY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
 
   v_Count NUMBER;
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Default Accounts for all AcctSchema
   IF(UPDATING) THEN
     IF (:NEW.C_COUNTRY_ID <> :OLD.C_COUNTRY_ID OR :NEW.C_COUNTRY_ID IS NULL) THEN
--- a/src-db/database/model/triggers/C_BANKSTATEMENTLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BANKSTATEMENTLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
   v_Difference NUMBER:=0;
   v_ID VARCHAR2(32);
   v_RO NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Difference, ID
   IF(UPDATING OR INSERTING) THEN
     v_Difference:=:new.StmtAmt;
--- a/src-db/database/model/triggers/C_BANKSTATEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BANKSTATEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     * Title: RO check
     * Description:
     ************************************************************************/
-    BEGIN  IF(:old.Processed='Y')
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF(:old.Processed='Y')
     THEN  RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
     END IF;
 END C_BANKSTATEMENT_TRG
--- a/src-db/database/model/triggers/C_BPARTNER_LOCATION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BPARTNER_LOCATION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -36,7 +36,13 @@
     --v_Address2   VARCHAR2(60);
     v_name VARCHAR2(60) ;
     v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   DBMS_OUTPUT.PUT_LINE('C_BPartner_Location_Trg') ;
   IF(UPDATING) THEN
     IF NOT(COALESCE(:old.C_Location_ID, '0') <> COALESCE(:NEW.C_Location_ID, '0') OR COALESCE(:old.Updated, v_DateNull) <> COALESCE(:NEW.Updated, v_DateNull)) THEN
--- a/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -38,7 +38,13 @@
   v_xParent_ID      varchar2(32);
   v_BP_Acct_ID    varchar2(32);
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     --  Default Accounts for all AcctSchema
  IF (INSERTING) THEN
      FOR Cur_Defaults IN (SELECT  *
--- a/src-db/database/model/triggers/C_BP_BANKACCOUNTIBAN_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BP_BANKACCOUNTIBAN_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -35,7 +35,13 @@
   v_DigitBank NVARCHAR2(1);
   v_CountryId NVARCHAR2(2);
   v_Length NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --  Default Accounts for all AcctSchema
   IF(INSERTING OR UPDATING) THEN
     IF (:NEW.IBAN IS NOT NULL) THEN
--- a/src-db/database/model/triggers/C_BP_GROUP_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BP_GROUP_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
     TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
   v_acc_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/C_BP_SALCATEGORY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BP_SALCATEGORY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
 v_isCostApplied CHAR(1);
 v_count NUMBER;
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 
   IF (UPDATING OR INSERTING)  THEN
--- a/src-db/database/model/triggers/C_BP_SALCATEGORY_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BP_SALCATEGORY_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   TYPE RECORD IS REF CURSOR;
   Cur_Employees RECORD;
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 
   IF (UPDATING OR INSERTING OR DELETING)  THEN
--- a/src-db/database/model/triggers/C_BSTMTLINE_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BSTMTLINE_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   v_Posted             CHAR(1) ;
   v_C_BANKSTATEMENT_ID VARCHAR2(32) ;
   v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_BANKSTATEMENT_ID:=:NEW.C_BANKSTATEMENT_ID;
   ELSE
--- a/src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 ************************************************************************/
 v_Count NUMBER;
 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF UPDATING THEN
      IF (:old.Processed='Y'
         AND ((COALESCE(:old.STATEMENTDATE, v_DateNull) <> COALESCE(:new.STATEMENTDATE, v_DateNull))
--- a/src-db/database/model/triggers/C_BUDGETLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_BUDGETLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *    - create default Account records
     ************************************************************************/
   v_Type CHAR(1);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING OR UPDATING) THEN
     SELECT BUDGET_TYPE
     INTO v_Type
--- a/src-db/database/model/triggers/C_CASHBOOK_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CASHBOOK_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     ************************************************************************/
     TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/C_CASHLINE_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CASHLINE_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     ************************************************************************/
   v_Processed CHAR(1) ;
   v_C_CASH_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_CASH_ID:=:NEW.C_CASH_ID;
   ELSE
--- a/src-db/database/model/triggers/C_CASHLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CASHLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -51,7 +51,13 @@
  v_RO     NUMBER;
  --
  v_Trace     VARCHAR2(2000) := 'CashLine: ';
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
  /** Cannot change generated invoice data  */
  /* Correction by I. Ciordia: deleting and updating generated cashlines is allowed. Control is transfered to cashPost
  IF (DELETING) THEN
--- a/src-db/database/model/triggers/C_CASH_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CASH_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
     v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
-    BEGIN  IF UPDATING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF UPDATING
       THEN  IF(:old.Processed='Y'
         AND ((COALESCE(:old.STATEMENTDATE, v_DateNull) <> COALESCE(:new.STATEMENTDATE, v_DateNull))
         OR(COALESCE(:old.AD_ORGTRX_ID, '0') <> COALESCE(:new.AD_ORGTRX_ID, '0'))
--- a/src-db/database/model/triggers/C_CASH_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CASH_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *  Truncate Statement Date
     *  Update Statement Balances when Beginning Balance chages
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Truncate Statement Date
     :new.StatementDate:=TRUNC(:new.StatementDate) ;
   -- Update StatementDifference
--- a/src-db/database/model/triggers/C_CHARGE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CHARGE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
     */
     TYPE RECORD IS REF CURSOR;
     Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/C_COMMISSIONAMT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_COMMISSIONAMT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -33,7 +33,13 @@
   v_IsPositiveOnly CHAR(1) ;
   --
   v_Result NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING OR DELETING) THEN
     -- DBMS_OUTPUT.PUT_LINE('C_CommissionAmt_Trg - Subtract');
     -- Subtract old Amount from Header
--- a/src-db/database/model/triggers/C_COMMISSIONDETAIL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_COMMISSIONDETAIL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     */
   v_C_Currency_ID VARCHAR2(32);
   v_ConvDate DATE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING OR DELETING) THEN
     -- DBMS_OUTPUT.PUT_LINE('C_CommissionDetail_Trg - Subtract');
     -- Subtract old Amount/Qty from Amount
--- a/src-db/database/model/triggers/C_CONVERSION_RATE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CONVERSION_RATE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     * If there is no valid ToDate set it to arbitrary end date
     ************************************************************************/
       v_Count NUMBER;
-  BEGIN
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   --RAISE_APPLICATION_ERROR (-20506, 'Cannot modify used rate');
   IF(:new.ValidTo IS NULL) THEN
     -- If there is no end date, set it to X
--- a/src-db/database/model/triggers/C_CONVERSION_RATE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CONVERSION_RATE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_Count NUMBER;
-   BEGIN
+       v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
      --check for repeated dates
    select count(*)
     into v_Count
--- a/src-db/database/model/triggers/C_COUNTRY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_COUNTRY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 
-    BEGIN  IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF INSERTING
     THEN
     --  Create Translation Row
   INSERT
--- a/src-db/database/model/triggers/C_CURRENCY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_CURRENCY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 
-    BEGIN  IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF INSERTING
     THEN
     --  Create Translation Row
   INSERT
--- a/src-db/database/model/triggers/C_DEBT_PAYMENT_BAL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DEBT_PAYMENT_BAL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_Qty NUMBER:=0;
   v_Processed         CHAR(1) ;
   v_C_DEBT_PAYMENT_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(DELETING) THEN
     v_C_DEBT_PAYMENT_ID:=:old.C_DEBT_PAYMENT_ID;
   ELSE
--- a/src-db/database/model/triggers/C_DEBT_PAYMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DEBT_PAYMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -37,7 +37,13 @@
  v_Oldmultiplier NUMBER:=1;
  v_Processed CHAR(1);
  v_Aux NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   /* Checking constraints */
   IF (DELETING) THEN
     IF (:old.isValid = 'Y') THEN
--- a/src-db/database/model/triggers/C_DOCTYPE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DOCTYPE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * file and version.
     *************************************************************************
     */
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert C_DocType Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/C_DPMLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DPMLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     ************************************************************************/
   v_Processed CHAR(1) ;
   v_C_dp_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_DP_ID:=:NEW.C_DP_MANAGEMENT_ID;
   ELSE
--- a/src-db/database/model/triggers/C_DP_MANAGEMENTLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DP_MANAGEMENTLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,10 +22,22 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING) THEN
     IF (:NEW.status_from IS NULL) THEN
-      BEGIN
+          v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
         SELECT status
           INTO :NEW.status_from
           FROM c_debt_payment
--- a/src-db/database/model/triggers/C_DP_MANAGEMENT_CHK_RESTR_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_DP_MANAGEMENT_CHK_RESTR_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING THEN
     IF (    :OLD.processed = 'Y'
         AND (   (COALESCE (:OLD.documentno, '.') <>
--- a/src-db/database/model/triggers/C_ELEMENTVALUE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ELEMENTVALUE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_xTree_ID VARCHAR2(32);
   v_xParent_ID VARCHAR2(32);
   v_NextNo     VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert C_ElementValue Trigger
   --  for Translation
   --  and TreeNode
--- a/src-db/database/model/triggers/C_GREETING_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_GREETING_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
 *************************************************************************
 * Insert Translation
 */
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING
   THEN
     --  Create Translation Row
--- a/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_C_INVOICE_ID VARCHAR2(32) ;
   v_Prec NUMBER:=2;
   v_Currency     VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_INVOICE_ID:=:NEW.C_INVOICE_ID;
   ELSE
--- a/src-db/database/model/triggers/C_INVOICEDISCOUNT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICEDISCOUNT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_ID VARCHAR2(32);
   v_RO        NUMBER;
   v_Processed CHAR(1) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING THEN
     SELECT PROCESSED
     INTO v_Processed
--- a/src-db/database/model/triggers/C_INVOICELINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICELINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -38,7 +38,13 @@
  v_LineNetAmt  NUMBER;
  v_CinvoiceTaxID varchar2(32);
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 IF (UPDATING) THEN
  IF NOT(COALESCE(:old.QtyInvoiced,0) <> COALESCE(:NEW.QtyInvoiced,0)
   OR COALESCE(:old.LineNetAmt,0) <> COALESCE(:NEW.LineNetAmt,0)
--- a/src-db/database/model/triggers/C_INVOICELINE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICELINE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -37,7 +37,13 @@
   v_DateInvoiced DATE;
   v_Precision NUMBER;
   v_PriceList_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 -- This trigger is used for calculate the applied offers f0r the invoice
 
 
--- a/src-db/database/model/triggers/C_INVOICELINE_TRG3.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICELINE_TRG3.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -43,7 +43,13 @@
 vwithholdingtax NUMBER;
 vwithid varchar2(32);
 finish_process BOOLEAN := FALSE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     v_invoiceid := :NEW.c_invoice_id;
     vexcludeforwh := :NEW.excludeforwithholding;
@@ -81,7 +87,13 @@
       end if;
   END IF;
   IF (NOT finish_process) THEN
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
       select bpwh.is_percent_wh, bpwh.wh_percent, bpwh.include_tax, bpwh.c_tax_id,wh.rate
       into isbaseamountpercent, baseamountpercent,  includetaxinps, taxinps_id,withpercent
         from c_bp_withholding bpwh, c_withholding wh
--- a/src-db/database/model/triggers/C_INVOICETAX_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICETAX_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
   v_ID VARCHAR2(32);
   v_RO        NUMBER;
   v_Processed CHAR(1) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING THEN
     SELECT PROCESSED
     INTO v_Processed
--- a/src-db/database/model/triggers/C_INVOICETAX_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICETAX_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -41,7 +41,13 @@
 whamountnew NUMBER;
 vwithid varchar2(32);
 finish_process BOOLEAN := FALSE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(inserting) THEN
     v_invoiceid := :NEW.c_invoice_id;
     v_taxid := :NEW.c_tax_id;
@@ -73,7 +79,13 @@
      select iswithholdingtax into v_IsWithTax from c_tax where c_tax_id=v_taxid;
 
      -- Read data from Withholding
-     BEGIN
+         v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
        select bpwh.is_percent_wh, bpwh.wh_percent, bpwh.include_tax, bpwh.c_tax_id , wh.rate
        into isbaseamountpercent, baseamountpercent,  includetaxinps, taxinps_id, withpercent
        from c_bp_withholding bpwh ,c_withholding wh
--- a/src-db/database/model/triggers/C_INVOICE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     * Title: Check in deleting, invoice not processed
     ************************************************************************/
    v_n NUMBER;
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- If invoice is processed, is not allowed to change C_BPartner
     IF UPDATING
     THEN  IF(:OLD.Processed='Y'
--- a/src-db/database/model/triggers/C_INVOICE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVOICE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
    TYPE RECORD IS REF CURSOR;
   Cur_Discounts RECORD;
   v_Key VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   FOR Cur_Discounts IN
     (
     SELECT C_DISCOUNT_ID,
--- a/src-db/database/model/triggers/C_INVTAX_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_INVTAX_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 ************************************************************************/
   v_Processed CHAR(1) ;
   v_C_INVOICE_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_INVOICE_ID:=:new.C_INVOICE_ID;
   ELSE
--- a/src-db/database/model/triggers/C_LOCATION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_LOCATION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
   cur_Bank RECORD;
   cur_BankAccount RECORD;
   v_IBANCount NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   FOR cur_Bank IN 
     (SELECT C_BANK_ID
     FROM C_BANK
--- a/src-db/database/model/triggers/C_ORDERLINE2_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDERLINE2_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_QtyReserved      NUMBER;
   v_QtyOrderReserved NUMBER;
   V_STOCKED          NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING) THEN
     IF(:NEW.M_PRODUCT_ID IS NOT NULL) THEN
       IF((COALESCE(:old.QtyDelivered, 0) <> COALESCE(:NEW.QtyDelivered, 0))) THEN
--- a/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -37,7 +37,13 @@
   v_UOM_ID    VARCHAR2(32);
   v_IsSOTrx CHAR(1);
   v_Count NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 IF (UPDATING) THEN
   IF NOT(COALESCE(:old.M_Product_ID,'0') <> COALESCE(:NEW.M_Product_ID,'0')
   OR COALESCE(:old.LineNetAmt,0) <> COALESCE(:NEW.LineNetAmt,0)
--- a/src-db/database/model/triggers/C_ORDERLINE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDERLINE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -37,7 +37,13 @@
   v_Insert BOOLEAN :=FALSE;
   v_Precision NUMBER;
   v_PriceList_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 
 
--- a/src-db/database/model/triggers/C_ORDERTAX_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDERTAX_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -32,7 +32,13 @@
   v_Processed  CHAR(1) ;
   v_C_ORDER_ID VARCHAR2(32) ;
   v_Docaction NVARCHAR2(2) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_ORDER_ID:=:new.C_ORDER_ID;
   ELSE
--- a/src-db/database/model/triggers/C_ORDER_CHK_RESTRINCTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDER_CHK_RESTRINCTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -15,7 +15,13 @@
 v_amt NUMBER;
 v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING THEN
     IF(:OLD.Processed='Y' AND :OLD.Docaction <> 'CL'
           AND(
--- a/src-db/database/model/triggers/C_ORDER_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDER_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *  Update potentially existing Invoices with Payment Info
     *  Sync Header Changes to Lines
     ************************************************************************/
-    BEGIN  IF(UPDATING)
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF(UPDATING)
     THEN  IF((COALESCE(:old.Description, '.') <> COALESCE(:NEW.Description, '.')
     OR COALESCE(:old.POReference, '.') <> COALESCE(:NEW.POReference, '.')
     OR COALESCE(:old.C_BPartner_ID, '0') <> COALESCE(:NEW.C_BPartner_ID, '0')
--- a/src-db/database/model/triggers/C_ORDER_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDER_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
     v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
-    BEGIN  IF(UPDATING)
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF(UPDATING)
     THEN  IF((COALESCE(:old.PaymentRule, '.') <> COALESCE(:NEW.PaymentRule, '.')
     OR COALESCE(:old.C_PaymentTerm_ID, '0') <> COALESCE(:NEW.C_PaymentTerm_ID, '0')
     OR COALESCE(:old.DateAcct, v_DateNull) <> COALESCE(:NEW.DateAcct, v_DateNull)))
--- a/src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
   v_Processed CHAR(1) ;
   v_C_ORDER_ID VARCHAR2(32) ;
   v_Docaction NVARCHAR2(2) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_ORDER_ID:=:NEW.C_ORDER_ID;
   ELSE
--- a/src-db/database/model/triggers/C_PAYMENTTERM_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PAYMENTTERM_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * file and version.
     *************************************************************************
     */
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Insert C_PaymentTerm Trigger
     --  for Translation
     IF INSERTING
--- a/src-db/database/model/triggers/C_PERIOD_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PERIOD_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     v_NextNo VARCHAR2(32);
   TYPE RECORD IS REF CURSOR;
     CUR_DocType RECORD;
-  BEGIN
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     FOR CUR_DocType IN
       (SELECT Value , a.AD_Org_ID AS Organization
        FROM AD_Ref_List , (SELECT AD_Org_ID 
--- a/src-db/database/model/triggers/C_PERIOD_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PERIOD_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     * Calculate End Date
     */
     v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 
    IF(UPDATING) THEN
--- a/src-db/database/model/triggers/C_PROJECTLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECTLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
     v_PriceLimit NUMBER:=NULL;
   v_PriceStd NUMBER:=NULL;
   v_PlannedMargin NUMBER:=NULL;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Calculate PlannedAmt
   IF(:new.PlannedQty <> 0 AND :new.PlannedPrice <> 0) THEN
     :new.PlannedAmt:=:new.PlannedQty * :new.PlannedPrice;
--- a/src-db/database/model/triggers/C_PROJECTLINE_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECTLINE_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -2,7 +2,13 @@
   <database name="TRIGGER C_PROJECTLINE_TRG2">
     <trigger name="C_PROJECTLINE_TRG2" table="C_PROJECTLINE" fires="after" insert="true" update="true" delete="false" foreach="statement">
       <body><![CDATA[
- BEGIN
+     v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     /*************************************************************************
     * The contents of this file are subject to the Compiere Public
     * License 1.1 ("License"); You may not use this file except in
--- a/src-db/database/model/triggers/C_PROJECTPHASE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECTPHASE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
 ************************************************************************
 */
 v_projecttaskid VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 IF (:NEW.ISCOMPLETE = 'Y') THEN
   SELECT MAX(PT.C_PROJECTTASK_ID)
   INTO v_projecttaskid
--- a/src-db/database/model/triggers/C_PROJECTPROPOSALTASK_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECTPROPOSALTASK_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
   v_Project VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT C_Project_ID
   INTO v_Project
   FROM C_PROJECTPROPOSAL
--- a/src-db/database/model/triggers/C_PROJECT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -34,7 +34,13 @@
   --
   TYPE RECORD IS REF CURSOR;
     Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/C_PROJECT_TRG2.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECT_TRG2.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
     * Description:
     ************************************************************************/
     v_Count NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT COUNT(*)
   INTO v_Count
   FROM C_PROJECTLINE
--- a/src-db/database/model/triggers/C_PROJECT_TRG3.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_PROJECT_TRG3.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_Count NUMBER;
   v_Tree_ID   varchar2(32);
   v_Parent_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   SELECT c.AD_Tree_Project_ID,
     n.Node_ID
   INTO v_Tree_ID,
--- a/src-db/database/model/triggers/C_REMITTANCELINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_REMITTANCELINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   v_C_Remittance_ID VARCHAR2(32) ;
   v_Prec NUMBER:=2;
   v_Currency        VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_C_Remittance_ID:=:NEW.C_Remittance_ID;
   ELSE
--- a/src-db/database/model/triggers/C_REMITTANCE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_REMITTANCE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
 * Title: Check in deleting, invoice not processed
 ************************************************************************/
 v_DateNull DATE := TO_DATE('31-12-9999','DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- If remittance is processed, is not allowed to change
   IF (UPDATING) THEN
     IF (:OLD.processed = 'Y' AND ((COALESCE (:OLD.documentno, '')!= COALESCE (:NEW.documentno, ''))
--- a/src-db/database/model/triggers/C_REVENUERECOGNITION_PLAN_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_REVENUERECOGNITION_PLAN_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -32,7 +32,13 @@
   v_NextNo       VARCHAR2(32);
   v_Qty          NUMBER;
   v_M_Product_ID VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Is RevenueRecognition Time Based
   SELECT IsTimeBased
   INTO v_IsTimeBased
--- a/src-db/database/model/triggers/C_SALESREGION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_SALESREGION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
     v_Tree_ID VARCHAR2(32);
   v_Parent_ID VARCHAR2(32);
   --
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     --  Create TreeNode --
     --  get AD_Tree_ID + ParentID
--- a/src-db/database/model/triggers/C_SETTLEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_SETTLEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
  * Contributor(s):  ______________________________________.
  ************************************************************************/
 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
  -- If invoice is processed, is not allowed to change C_BPartner
  IF UPDATING THEN
  IF (:OLD.Processed = 'Y' AND
--- a/src-db/database/model/triggers/C_TAXCATEGORY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAXCATEGORY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
     *************************************************************************
     * Insert Translation
     */
-    BEGIN  IF INSERTING
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF INSERTING
     THEN
     --  Create Translation Row
   INSERT
--- a/src-db/database/model/triggers/C_TAXPAYMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAXPAYMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     * Insert Translation
     */
 
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF UPDATING
     THEN  IF (:OLD.PROCESSED)='Y' AND (:OLD.processing) = 'N' and (:OLD.processing)=(:new.processing)
     THEN  RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
--- a/src-db/database/model/triggers/C_TAXREGISTERLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAXREGISTERLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
 V_PROCESSED VARCHAR2(1);
 V_PROCESSING VARCHAR2(1);
 
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF UPDATING THEN
     SELECT  TP.PROCESSED, TP.PROCESSING
     INTO V_PROCESSED, V_PROCESSING
--- a/src-db/database/model/triggers/C_TAXREGISTER_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAXREGISTER_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -21,7 +21,13 @@
 V_PROCESSED VARCHAR2(1);
 V_PROCESSING VARCHAR2(1);
 
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF UPDATING THEN
     SELECT  PROCESSED, PROCESSING
     INTO V_PROCESSED, V_PROCESSING
--- a/src-db/database/model/triggers/C_TAX_REPORT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAX_REPORT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
   v_xTree_ID VARCHAR2(32);
   v_xParent_ID VARCHAR2(32);
   v_NextNo     VARCHAR2(32);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Insert AD_Menu Trigger
   --  for Translation
   --  and TreeNode
--- a/src-db/database/model/triggers/C_TAX_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_TAX_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
     ************************************************************************/
     TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     -- Tax Account Defaults
     FOR Cur_Defaults IN
--- a/src-db/database/model/triggers/C_UOM_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_UOM_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     * Title: UOM Translation
     * Description:
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF INSERTING
     THEN
     --  Create Translation Row
--- a/src-db/database/model/triggers/C_VALIDCOMBINATION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_VALIDCOMBINATION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -78,7 +78,13 @@
   FROM C_ElementValue WHERE C_ElementValue_ID=:new.User2_ID AND IsActive = 'Y';
  --
  v_change    BOOLEAN;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
  --  Load C_AcctSchema Info (if not valid: 01403 no data found)
  SELECT Separator
    INTO v_Separator
--- a/src-db/database/model/triggers/C_WITHHOLDING_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/C_WITHHOLDING_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
     */
    TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING)THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   v_Posted        CHAR(1) ;
   v_GL_JOURNAL_ID VARCHAR2(32) ;
   v_DateNull DATE :=TO_DATE('01-01-1900','DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_GL_JOURNAL_ID:=:new.GL_JOURNAL_ID;
   ELSE
--- a/src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
   v_rate              NUMBER;
   v_CurrencyRate      NUMBER;
   v_CurrencyRateType  CHAR(1) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING) THEN
     IF NOT((COALESCE(:old.AMTSOURCEDR, 0) <> COALESCE(:NEW.AMTSOURCEDR, 0) OR COALESCE(:old.AMTSOURCECR, 0) <> COALESCE(:NEW.AMTSOURCECR, 0) OR COALESCE(:old.C_CURRENCY_ID, '0') <> COALESCE(:NEW.C_CURRENCY_ID, '0'))) THEN
       RETURN;
--- a/src-db/database/model/triggers/GL_JOURNALLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/GL_JOURNALLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -30,7 +30,13 @@
     ************************************************************************/
     v_ID VARCHAR2(32);
   v_RO NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Get ID
   IF(UPDATING OR INSERTING) THEN
     v_ID:=:new.GL_Journal_ID;
--- a/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
     v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     IF UPDATING
     THEN  IF(:old.Processed='Y'
     AND ((COALESCE(:old.DATEDOC, v_DateNull) <> COALESCE(:new.DATEDOC, v_DateNull))
--- a/src-db/database/model/triggers/GL_JOURNAL_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/GL_JOURNAL_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
     *  Journal
     * - Update Journal Batch Totals if exists (insert is always 0)
     */
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Subtract Old Amount
     IF(UPDATING) THEN
       IF(:old.TotalDr <> :NEW.TotalDr OR :OLD.TotalCr <> :NEW.TotalCr) THEN  
--- a/src-db/database/model/triggers/M_ATTRIBUTEVALUE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_ATTRIBUTEVALUE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
   pos        NUMBER;
   TYPE RECORD IS REF CURSOR;
   CurSetInstance RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF COALESCE(:New.Name,'.')!=COALESCE(:Old.Name,'.') THEN
     UPDATE M_AttributeInstance
        SET Value = :New.Name
--- a/src-db/database/model/triggers/M_INOUTLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INOUTLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
  * Contributor(s): Openbravo SL
  * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
  ******************************************************************************/
- BEGIN
+     v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
  IF (INSERTING) THEN
   IF (:NEW.M_PRODUCT_ID IS NOT NULL) THEN
      SELECT C_UOM_ID INTO v_UOM_ID FROM M_PRODUCT WHERE M_PRODUCT_ID=:NEW.M_PRODUCT_ID;
--- a/src-db/database/model/triggers/M_INOUT_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INOUT_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 
   v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
 
- BEGIN
+     v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF UPDATING THEN
     IF(:old.Processed='Y'
     AND ((COALESCE(:old.C_BPartner_ID, '0') <> COALESCE(:new.C_BPartner_ID, '0'))
--- a/src-db/database/model/triggers/M_INOUT_TRG_PROV.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INOUT_TRG_PROV.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
     ************************************************************************/
   v_docType_ID VARCHAR2(32) ;
   v_movementType CHAR(2) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   v_docType_ID:=:NEW.C_DocType_ID;
   SELECT(
     CASE isSOTrx
--- a/src-db/database/model/triggers/M_INTERNAL_CONSUMPTIONLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INTERNAL_CONSUMPTIONLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING OR UPDATING THEN
     v_ID:=:new.M_Internal_Consumption_ID;
   ELSIF DELETING THEN
--- a/src-db/database/model/triggers/M_INVENTORYLINE2_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INVENTORYLINE2_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
-    BEGIN IF(UPDATING)
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+ IF(UPDATING)
     THEN  IF NOT((COALESCE(:OLD.M_Product_Uom_ID, '0') <> COALESCE(:NEW.M_Product_Uom_ID, '0')
     OR COALESCE(:OLD.QuantityOrderBook, 0) <> COALESCE(:NEW.QuantityOrderBook, 0)))
     THEN  RETURN;
--- a/src-db/database/model/triggers/M_INVENTORYLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INVENTORYLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   * Contributor(s): Openbravo SL
   * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
   ******************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Get ID
   IF(UPDATING OR INSERTING) THEN
     v_ID:=:NEW.M_Inventory_ID;
--- a/src-db/database/model/triggers/M_INVENTORY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_INVENTORY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
 v_DateNull DATE := TO_DATE('01-01-1900','DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF DELETING THEN
     IF (:old.PROCESSED = 'Y') THEN
       RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
--- a/src-db/database/model/triggers/M_IOLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_IOLINE_CHK_RESTRICTIONS_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 ************************************************************************/
   v_Processed CHAR(1) ;
   v_M_INOUT_ID VARCHAR2(32) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_M_INOUT_ID:=:new.M_INOUT_ID;
   ELSE
--- a/src-db/database/model/triggers/M_MATCHPO_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_MATCHPO_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -27,7 +27,13 @@
   * Contributor(s): Openbravo SL
   * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
   ******************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(UPDATING OR DELETING) THEN
     IF :OLD.M_INOUTLINE_ID IS NOT NULL THEN
       v_QtyOrdered:=:old.qty;
--- a/src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
   * Contributor(s): Openbravo SL
   * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
   ******************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Get ID
   IF(UPDATING OR INSERTING) THEN
     v_ID:=:new.M_Movement_ID;
--- a/src-db/database/model/triggers/M_MOVEMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_MOVEMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (:old.PROCESSED = 'Y' AND(
      (COALESCE(:old.MOVEMENTDATE, v_DateNull) <> COALESCE(:new.MOVEMENTDATE, v_DateNull))
      OR (COALESCE(:old.AD_ORGTRX_ID, '0') <> COALESCE(:new.AD_ORGTRX_ID, '0'))
--- a/src-db/database/model/triggers/M_PRODUCTIONLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCTIONLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
   *************************************************************************/
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING OR UPDATING THEN
     v_ID:=:new.M_ProductionPlan_ID;
   ELSIF DELETING THEN
--- a/src-db/database/model/triggers/M_PRODUCTIONPLAN_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCTIONPLAN_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     ************************************************************************/
     v_ID VARCHAR2(32);
   v_RO NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   -- Get ID
   IF(UPDATING OR INSERTING) THEN
     v_ID:=:new.M_Production_ID;
--- a/src-db/database/model/triggers/M_PRODUCTION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCTION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -23,7 +23,13 @@
     * Contributor(s):  ______________________________________.
     ************************************************************************/
 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (:old.PROCESSED = 'Y') THEN 
    IF (DELETING) THEN
       RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
--- a/src-db/database/model/triggers/M_PRODUCT_BOM_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCT_BOM_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -24,7 +24,13 @@
     *************************************************************************
     * Reset Verification flag of parent
     */
-    BEGIN  IF(INSERTING)
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+  IF(INSERTING)
     THEN
   UPDATE M_Product
     SET IsVerified='N'
--- a/src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
     */
    TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -31,7 +31,13 @@
     v_NextNo      VARCHAR2(32);
     v_ControlNo NUMBER;
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
  IF (UPDATING) THEN
   UPDATE M_PRODUCT_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
--- a/src-db/database/model/triggers/M_RAPPEL_INVOICE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_RAPPEL_INVOICE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 
- BEGIN
+     v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   DELETE FROM c_invoicetax WHERE c_invoice_id=:old.c_invoice_id;
   DELETE FROM c_invoiceline  WHERE c_invoice_id=:old.c_invoice_id;
   DELETE FROM c_invoice WHERE c_invoice_id=:old.c_invoice_id;
--- a/src-db/database/model/triggers/M_REQUISITIONLINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_REQUISITIONLINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
   v_ReqStatus CHAR(1);
   v_OrderedQty NUMBER;
 
-  BEGIN
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     SELECT DocStatus, :new.ReqStatus, 0 INTO v_DocStatus, v_ReqStatus, v_OrderedQty
     FROM M_Requisition
--- a/src-db/database/model/triggers/M_REQUISITIONORDER_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_REQUISITIONORDER_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -22,7 +22,13 @@
     v_DocStatus CHAR(2);
     v_ReqStatus CHAR(1);
     v_Count     NUMBER;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
 IF INSERTING THEN
   SELECT DocStatus INTO v_DocStatus
--- a/src-db/database/model/triggers/M_REQUISITION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_REQUISITION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -19,7 +19,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_DocStatus CHAR(2);
-  BEGIN
+      v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING THEN
     v_DocStatus := :new.DocStatus;
   ELSE
--- a/src-db/database/model/triggers/M_TRANSACTION_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_TRANSACTION_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_UOM_ID VARCHAR2(32) ;
   v_ATTRIBUTESET_ID VARCHAR2(32);
   v_Name NVARCHAR2(60);
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF INSERTING OR UPDATING THEN
     SELECT C_UOM_ID, M_ATTRIBUTESET_ID, name
     INTO v_UOM_ID, v_attributeset_id, v_name
--- a/src-db/database/model/triggers/M_WAREHOUSE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/M_WAREHOUSE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
 
   TYPE RECORD IS REF CURSOR;
   Cur_Defaults RECORD;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     FOR Cur_Defaults IN
       (
--- a/src-db/database/model/triggers/S_EXPENSETYPE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_EXPENSETYPE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *   Syncronize Resource with Product
     ************************************************************************/
     NextNo M_Product.M_Product_ID%TYPE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     AD_Sequence_Next('M_Product', :new.AD_Client_ID, NextNo) ;
     INSERT
--- a/src-db/database/model/triggers/S_RESOURCEASSIGNMENT_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_RESOURCEASSIGNMENT_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *   Syncronize Resource Assugnment with Expense Reports
     ************************************************************************/
     v_Description NVARCHAR2(255) ;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   NULL;
   /**
   IF (INSERTING OR UPDATING) THEN
--- a/src-db/database/model/triggers/S_RESOURCETYPE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_RESOURCETYPE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -28,7 +28,13 @@
     * Description:
     *   Syncronize Resource Type with Product
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   UPDATE M_Product
     SET C_UOM_ID=:new.C_UOM_ID,
     M_Product_Category_ID=:new.M_Product_Category_ID,
--- a/src-db/database/model/triggers/S_RESOURCEUNAVAILABLE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_RESOURCEUNAVAILABLE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -29,7 +29,13 @@
     *   - Truncate + Fill date
     *   - Endure that start < end
     ************************************************************************/
-    BEGIN
+        v_ADEnabledTriggers NUMBER;
+BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
     -- Truncate + Fill Date
     :new.DateFrom:=TRUNC(:new.DateFrom) ;
   IF(:new.DateTo IS NULL) THEN
--- a/src-db/database/model/triggers/S_RESOURCE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_RESOURCE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -32,7 +32,13 @@
   v_C_UOM_ID              M_Product.C_UOM_ID%TYPE;
   v_M_Product_Category_ID M_Product.M_Product_Category_ID%TYPE;
   v_C_TaxCategory_ID      M_Product.C_TaxCategory_ID%TYPE;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF(INSERTING) THEN
     -- Get ResourceType Info
     SELECT C_UOM_ID,
--- a/src-db/database/model/triggers/S_TIMEEXPENSELINE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_TIMEEXPENSELINE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -26,7 +26,13 @@
   v_TimeExpense_ID VARCHAR2(32);
   v_RO NUMBER;
   v_need_verification BOOLEAN := true;
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
   IF (INSERTING OR UPDATING) THEN
     v_TimeExpense_ID := :NEW.S_TIMEEXPENSE_ID;
   ELSE
--- a/src-db/database/model/triggers/S_TIMEEXPENSE_TRG.xml	Mon Nov 24 12:04:24 2008 +0000
+++ b/src-db/database/model/triggers/S_TIMEEXPENSE_TRG.xml	Mon Nov 24 12:32:14 2008 +0000
@@ -25,7 +25,13 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
 
+    v_ADEnabledTriggers NUMBER;
 BEGIN
+    SELECT COUNT(*) INTO v_ADEnabledTriggers FROM AD_ENABLE_TRIGGERS WHERE ISENABLED='N';
+    IF v_ADEnabledTriggers!=0 THEN RETURN;
+    END IF;
+
+
 
  IF (INSERTING) THEN
   IF (:NEW.PROCESSED = 'Y') THEN