fixed erp_devel_pi-full-pgsql - Build # 783
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 19 Feb 2010 14:16:19 +0100
changeset 6500 cbe25f0abf2c
parent 6499 e2616479f44e
child 6501 c2f5064a60dc
fixed erp_devel_pi-full-pgsql - Build # 783
src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml
--- a/src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml	Fri Feb 19 13:45:50 2010 +0100
+++ b/src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml	Fri Feb 19 14:16:19 2010 +0100
@@ -99,8 +99,8 @@
   
   --Check the only updated column is isFullyAudited. In this case maitin updated
   --column as it was to prevent changes detection when trying to update database
-  IF (UPDATING AND 
-      COALESCE(:NEW.ISACTIVE             ,'.') = COALESCE(:OLD.ISACTIVE             ,'.') AND                                                                                                                                                                            
+  IF (UPDATING) THEN
+    IF (COALESCE(:NEW.ISACTIVE             ,'.') = COALESCE(:OLD.ISACTIVE             ,'.') AND                                                                                                                                                                            
       COALESCE(:NEW.NAME                 ,'.') = COALESCE(:OLD.NAME                 ,'.') AND                                                                                                                                                                            
       COALESCE(:NEW.DESCRIPTION          ,'.') = COALESCE(:OLD.DESCRIPTION          ,'.') AND                                                                                                                                                                            
       COALESCE(:NEW.HELP                 ,'.') = COALESCE(:OLD.HELP                 ,'.') AND                                                                                                                                                                            
@@ -124,6 +124,7 @@
       COALESCE(:NEW.ACCTCLASSNAME        ,'.') = COALESCE(:OLD.ACCTCLASSNAME        ,'.') AND
       :NEW.ISFULLYAUDITED != :OLD.ISFULLYAUDITED) THEN
          :NEW.UPDATED := :OLD.UPDATED;
+    END IF;
   END IF;
 END AD_TABLE_MOD_TRG
 ]]></body>