database/model/triggers/AD_PRINTFORMATITEM_BTRG.xml
author Gorka Ion Damián <gorkaion.damian@openbravo.com>
Fri, 14 Dec 2007 16:21:33 +0000
changeset 239 a30acae847e1
parent 170 4b5493776a7f
child 735 daced7e311c9
permissions -rw-r--r--
Added CDATA to views, functions and triggers.
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
    /*************************************************************************
adrian@94
    11
    * The contents of this file are subject to the Compiere License
adrian@94
    12
    * Version 2.5.0 ("License"); You may not use this file except in
adrian@94
    13
    * compliance with the License. You may obtain a copy of the License at
adrian@94
    14
    * http://www.compiere.org/license.html
adrian@94
    15
    * Software distributed under the License is distributed on an
adrian@94
    16
    * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
adrian@94
    17
    * implied. See the License for the specific language governing rights
adrian@94
    18
    * and limitations under the License.
gorkaion@239
    19
    * The Original Code is  Compiere  ERP &  Business Solution
adrian@94
    20
    * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
adrian@94
    21
    Inc.
adrian@94
    22
    * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
adrian@94
    23
    * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
adrian@94
    24
    * All Rights Reserved.
adrian@94
    25
    * Contributor(s): Openbravo SL
adrian@94
    26
    * Contributions are Copyright (C) 1999-2005 Openbravo, S.L
adrian@94
    27
    *************************************************************************
adrian@94
    28
    * $Id: AD_PrintFormatItem_BTrg.sql,v 1.2 2002/08/26 05:23:32 jjanke Exp $
adrian@94
    29
    ***
adrian@94
    30
    * Title: AD_PrintFormatItem
adrian@94
    31
    * Description:
adrian@94
    32
    *   - DeSelect Group By when not Sort Order
adrian@94
    33
    *   - Absolute/Relative Setting
adrian@94
    34
    ************************************************************************/
adrian@94
    35
    -- If Order By is de-selected de-select Group by too
adrian@94
    36
  IF(:new.IsOrderBy='N') THEN
adrian@94
    37
    :new.SortNo:=0;
adrian@94
    38
    :new.IsGroupBy:='N';
adrian@94
    39
    :new.IsPageBreak:='N';
adrian@94
    40
    END IF;
adrian@94
    41
  IF(:new.IsRelativePosition='Y') THEN
adrian@94
    42
    :new.XPosition:=0;
adrian@94
    43
    :new.YPosition:=0;
adrian@94
    44
  ELSE
adrian@94
    45
    :new.XSpace:=0;
adrian@94
    46
    :new.YSpace:=0;
adrian@94
    47
  END IF;
adrian@94
    48
END AD_PrintFormatItem_BTrg
adrian@94
    49
adrian@170
    50
gorkaion@239
    51
gorkaion@239
    52
]]></body>
adrian@94
    53
    </trigger>
adrian@94
    54
  </database>