src-db/database/model/triggers/AD_ELEMENT_TRG.xml
changeset 1605 8a0fe0193bef
parent 785 8dba91261590
child 1929 ad0353d93b0f
equal deleted inserted replaced
1604:a1c518e6ed93 1605:8a0fe0193bef
    34     IF INSERTING
    34     IF INSERTING
    35     THEN
    35     THEN
    36   INSERT
    36   INSERT
    37   INTO AD_Element_Trl
    37   INTO AD_Element_Trl
    38     (
    38     (
    39       AD_Element_ID, AD_Language, AD_Client_ID,
    39       AD_Element_Trl_ID, AD_Element_ID, AD_Language, AD_Client_ID,
    40       AD_Org_ID, IsActive, Created,
    40       AD_Org_ID, IsActive, Created,
    41       CreatedBy, Updated, UpdatedBy,
    41       CreatedBy, Updated, UpdatedBy,
    42       Name, PrintName, Description,
    42       Name, PrintName, Description,
    43       Help, PO_Name, PO_PrintName,
    43       Help, PO_Name, PO_PrintName,
    44       PO_Description, PO_Help, IsTranslated
    44       PO_Description, PO_Help, IsTranslated
    45     )
    45     )
    46   SELECT :new.AD_Element_ID,
    46   SELECT get_uuid(), :new.AD_Element_ID,
    47     AD_Language, :new.AD_Client_ID, :new.AD_Org_ID,
    47     AD_Language, :new.AD_Client_ID, :new.AD_Org_ID,
    48     :new.IsActive, :new.Created, :new.CreatedBy,
    48     :new.IsActive, :new.Created, :new.CreatedBy,
    49     :new.Updated, :new.UpdatedBy, :new.Name,
    49     :new.Updated, :new.UpdatedBy, :new.Name,
    50     :new.PrintName, :new.Description, :new.Help,
    50     :new.PrintName, :new.Description, :new.Help,
    51     :new.PO_Name, :new.PO_PrintName, :new.PO_Description,
    51     :new.PO_Name, :new.PO_PrintName, :new.PO_Description,
    71   UPDATE AD_PrintInfo pi
    71   UPDATE AD_PrintInfo pi
    72   SET  PrintName=:new.PrintName
    72   SET  PrintName=:new.PrintName
    73   WHERE EXISTS (SELECT * FROM AD_Column c
    73   WHERE EXISTS (SELECT * FROM AD_Column c
    74   WHERE c.AD_Column_ID=pi.AD_Column_ID
    74   WHERE c.AD_Column_ID=pi.AD_Column_ID
    75   AND c.AD_Element_ID=:new.AD_Element_ID)
    75   AND c.AD_Element_ID=:new.AD_Element_ID)
    76   AND (AD_Client_ID=0 OR PrintName=:old.PrintName);
    76   AND (AD_Client_ID='0' OR PrintName=:old.PrintName);
    77   END IF;
    77   END IF;
    78   **/
    78   **/
    79   --  reset Translation flag
    79   --  reset Translation flag
    80   IF(COALESCE(:old.Name,'.') <> COALESCE(:new.Name,'.') OR COALESCE(:old.PO_Name,'.') <> COALESCE(:new.PO_Name,'.')  OR COALESCE(:old.PrintName,'.') <> COALESCE(:new.PrintName,'.') OR COALESCE(:old.PO_PrintName,'.') <> COALESCE(:new.PO_PrintName,'.')  OR COALESCE(:old.Description,'.') <> COALESCE(:new.Description,'.') OR COALESCE(:old.PO_Description,'.') <> COALESCE(:new.PO_Description,'.')  OR COALESCE(:old.Help,'.') <> COALESCE(:new.Help,'.') OR COALESCE(:old.PO_Help,'.') <> COALESCE(:new.PO_Help,'.')) THEN
    80   IF(COALESCE(:old.Name,'.') <> COALESCE(:new.Name,'.') OR COALESCE(:old.PO_Name,'.') <> COALESCE(:new.PO_Name,'.')  OR COALESCE(:old.PrintName,'.') <> COALESCE(:new.PrintName,'.') OR COALESCE(:old.PO_PrintName,'.') <> COALESCE(:new.PO_PrintName,'.')  OR COALESCE(:old.Description,'.') <> COALESCE(:new.Description,'.') OR COALESCE(:old.PO_Description,'.') <> COALESCE(:new.PO_Description,'.')  OR COALESCE(:old.Help,'.') <> COALESCE(:new.Help,'.') OR COALESCE(:old.PO_Help,'.') <> COALESCE(:new.PO_Help,'.')) THEN
    81     UPDATE AD_Element_Trl
    81     UPDATE AD_Element_Trl