src-db/database/model/triggers/AD_PRINTLABELLINE_TRG.xml
changeset 799 fef2c5e2feb7
parent 798 4994e5a604bb
child 800 1ad8094b366f
--- a/src-db/database/model/triggers/AD_PRINTLABELLINE_TRG.xml	Wed Apr 30 10:48:47 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER AD_PRINTLABELLINE_TRG">
-    <trigger name="AD_PRINTLABELLINE_TRG" table="AD_PRINTLABELLINE" fires="after" insert="true" update="true" delete="false" foreach="row">
-      <body><![CDATA[
- BEGIN
-    /*************************************************************************
-    * The contents of this file are subject to the Compiere Public
-    * License 1.1 ("License"); You may not use this file except in
-    * compliance with the License. You may obtain a copy of the License in
-    * the legal folder of your Openbravo installation.
-    * Software distributed under the License is distributed on an
-    * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-    * implied. See the License for the specific language governing rights
-    * and limitations under the License.
-    * The Original Code is  Compiere  ERP &  Business Solution
-    * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
-    * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
-    * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
-    * All Rights Reserved.
-    * Contributor(s): Openbravo SL
-    * Contributions are Copyright (C) 2001-2008 Openbravo, S.L.
-    *
-    * Specifically, this derivative work is based upon the following Compiere
-    * file and version.
-    *************************************************************************
-    * $Id: AD_PrintFormatItem_Trg.sql,v 1.3 2003/02/18 03:33:22 jjanke Exp $
-    ***
-    * Title: AD_PrintFormatItem
-    * Description:
-    *   - Insert Translation
-    ************************************************************************/
- IF(INSERTING) THEN
-    -- Copy
-  INSERT
-  INTO AD_PRINTLABELLINE_TRL
-    (
-      AD_PRINTLABELLINE_ID, AD_Language, AD_Client_ID,
-      AD_Org_ID, IsActive, Created,
-      CreatedBy, Updated, UpdatedBy,
-      PrintName, IsTranslated
-    )
-  SELECT :new.AD_PRINTLABELLINE_ID,
-    AD_Language, :new.AD_Client_ID, :new.AD_Org_ID,
-    :new.IsActive, :new.Created, :new.CreatedBy,
-    :new.Updated, :new.UpdatedBy, :new.PrintName, 'N'
-  FROM AD_Language
-  WHERE IsActive='Y'
-    AND IsSystemLanguage='Y';
-  --  Translate if Multi-Lingual
-  UPDATE AD_PRINTLABELLINE_TRL
-    SET PrintName=
-    (
-    SELECT e.PrintName
-    FROM AD_Element_Trl e,
-      AD_Column c
-    WHERE e.AD_Language=AD_PRINTLABELLINE_TRL.AD_Language
-      AND e.AD_Element_ID=c.AD_Element_ID
-      AND c.AD_Column_ID=:new.AD_Column_ID
-    )
-  WHERE AD_PRINTLABELLINE_ID=:new.AD_PRINTLABELLINE_ID
-    AND EXISTS
-    (
-    SELECT *
-    FROM AD_Element_Trl e,
-      AD_Column c
-    WHERE e.AD_Language=AD_PRINTLABELLINE_TRL.AD_Language
-      AND e.AD_Element_ID=c.AD_Element_ID
-      AND c.AD_Column_ID=:new.AD_Column_ID
-      AND LENGTH(:new.PrintName) > 0
-    )
-    AND EXISTS
-    (
-    SELECT *
-    FROM AD_Client
-    WHERE AD_Client_ID=AD_PRINTLABELLINE_TRL.AD_Client_ID
-      AND IsMultiLingualDocument='Y'
-    )
-    ;
-  END IF;
-  -- Optionally Copy Info and Mark for Translation
-  IF(UPDATING) THEN
-    IF(COALESCE(:old.PrintName,'.') <> COALESCE(:new.PrintName,'.')) THEN
-      UPDATE AD_PRINTLABELLINE_TRL
-        SET IsTranslated='N'
-      WHERE AD_PRINTLABELLINE_ID=:new.AD_PRINTLABELLINE_ID;
-      -- Copy if not Multi-Lingual
-      UPDATE AD_PRINTLABELLINE_TRL
-        SET PrintName=:new.PrintName
-      WHERE AD_PRINTLABELLINE_ID=:new.AD_PRINTLABELLINE_ID
-        AND EXISTS
-        (
-        SELECT *
-        FROM AD_Client
-        WHERE AD_Client_ID=:new.AD_Client_ID
-        AND IsMultiLingualDocument='N'
-      )
-      ;
-  END IF;
- END IF;
-END AD_PRINTLABELLINE_TRG
-]]></body>
-    </trigger>
-  </database>