src-db/database/model/triggers/AD_PRINTFORMATITEM_BTRG.xml
author Juan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Thu, 24 Apr 2008 19:34:53 +0000
changeset 771 f0f606b4acf4
parent 756 ae11e4610537
child 778 6150609a1a0a
permissions -rw-r--r--
Update database files with the correct license
adrian@94
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TRIGGER AD_PRINTFORMATITEM_BTRG">
adrian@94
     3
    <trigger name="AD_PRINTFORMATITEM_BTRG" table="AD_PRINTFORMATITEM" fires="before" insert="true" update="true" delete="false" foreach="row">
gorkaion@239
     4
      <body><![CDATA[
gorkaion@239
     5
adrian@170
     6
adrian@94
     7
adrian@94
     8
adrian@94
     9
BEGIN
adrian@94
    10
    /*************************************************************************
juanpablo@771
    11
    * The contents of this file are subject to the Compiere Public
juanpablo@771
    12
    * License 1.1 ("License"); You may not use this file except in
juanpablo@771
    13
    * compliance with the License. You may obtain a copy of the License in
juanpablo@771
    14
    * the legal folder of your Openbravo installation.
juanpablo@771
    15
adrian@94
    16
    * Software distributed under the License is distributed on an
adrian@94
    17
    * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
adrian@94
    18
    * implied. See the License for the specific language governing rights
juanpablo@771
    19
adrian@94
    20
    * and limitations under the License.
juanpablo@771
    21
    * The Original Code is  Compiere  ERP \&  Business Solution
juanpablo@771
    22
    * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
juanpablo@771
    23
adrian@94
    24
    * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
adrian@94
    25
    * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
adrian@94
    26
    * All Rights Reserved.
adrian@94
    27
    * Contributor(s): Openbravo SL
juanpablo@771
    28
juanpablo@771
    29
    * Contributions are Copyright (C) 1999-2008 Openbravo, S.L
juanpablo@771
    30
    *
juanpablo@771
    31
    * Specifically, this derivative work is based upon the following Compiere
juanpablo@771
    32
    * file and version.
adrian@94
    33
    *************************************************************************
adrian@94
    34
    * $Id: AD_PrintFormatItem_BTrg.sql,v 1.2 2002/08/26 05:23:32 jjanke Exp $
adrian@94
    35
    ***
adrian@94
    36
    * Title: AD_PrintFormatItem
adrian@94
    37
    * Description:
adrian@94
    38
    *   - DeSelect Group By when not Sort Order
adrian@94
    39
    *   - Absolute/Relative Setting
adrian@94
    40
    ************************************************************************/
adrian@94
    41
    -- If Order By is de-selected de-select Group by too
adrian@94
    42
  IF(:new.IsOrderBy='N') THEN
adrian@94
    43
    :new.SortNo:=0;
adrian@94
    44
    :new.IsGroupBy:='N';
adrian@94
    45
    :new.IsPageBreak:='N';
adrian@94
    46
    END IF;
adrian@94
    47
  IF(:new.IsRelativePosition='Y') THEN
adrian@94
    48
    :new.XPosition:=0;
adrian@94
    49
    :new.YPosition:=0;
adrian@94
    50
  ELSE
adrian@94
    51
    :new.XSpace:=0;
adrian@94
    52
    :new.YSpace:=0;
adrian@94
    53
  END IF;
antonio@735
    54
END AD_PRINTFORMATITEM_BTRG
gorkaion@239
    55
]]></body>
adrian@94
    56
    </trigger>
adrian@94
    57
  </database>