modules/org.openbravo.userinterface.selector/src-db/database/model/triggers/OBUISEL_SELECTOR_LANGUAGE_TRG.xml
changeset 9076 c4f1a5c7d7c2
child 10776 af843b0eb622
equal deleted inserted replaced
9075:b3ea04de2722 9076:c4f1a5c7d7c2
       
     1 <?xml version="1.0"?>
       
     2   <database name="TRIGGER OBUISEL_SELECTOR_LANGUAGE_TRG">
       
     3     <trigger name="OBUISEL_SELECTOR_LANGUAGE_TRG" table="OBUISEL_SELECTOR_TRL" fires="before" insert="true" update="true" delete="false" foreach="row">
       
     4       <body><![CDATA[
       
     5   /*************************************************************************
       
     6   * The contents of this file are subject to the Openbravo  Public  License
       
     7   * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
       
     8   * Version 1.1  with a permitted attribution clause; you may not  use this
       
     9   * file except in compliance with the License. You  may  obtain  a copy of
       
    10   * the License at http://www.openbravo.com/legal/license.html
       
    11   * Software distributed under the License  is  distributed  on  an "AS IS"
       
    12   * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
       
    13   * License for the specific  language  governing  rights  and  limitations
       
    14   * under the License.
       
    15   * The Original Code is Openbravo ERP.
       
    16   * The Initial Developer of the Original Code is Openbravo SLU
       
    17   * All portions are Copyright (C) 2010 Openbravo SLU
       
    18   * All Rights Reserved.
       
    19   * Contributor(s):  ______________________________________.
       
    20   ************************************************************************/
       
    21   
       
    22   language VARCHAR2(6);
       
    23   
       
    24 BEGIN
       
    25     
       
    26     IF AD_isTriggerEnabled()='N' THEN RETURN;
       
    27     END IF;
       
    28 
       
    29     SELECT ad_language
       
    30     INTO language
       
    31     FROM AD_LANGUAGE
       
    32     WHERE AD_LANGUAGE_ID = :new.AD_LANGUAGE_ID;
       
    33  
       
    34     :new.AD_LANGUAGE := language;
       
    35 
       
    36     END OBUISEL_SELECTOR_LANGUAGE_TRG
       
    37 ]]></body>
       
    38     </trigger>
       
    39   </database>