src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml
changeset 1605 8a0fe0193bef
parent 756 ae11e4610537
child 2078 cf88ca44cdd2
--- a/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml	Wed Sep 03 17:10:52 2008 +0000
+++ b/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml	Wed Sep 03 17:55:37 2008 +0000
@@ -28,15 +28,15 @@
     IF UPDATING
     THEN  IF(:old.Processed='Y'
     AND ((COALESCE(:old.DATEDOC, v_DateNull) <> COALESCE(:new.DATEDOC, v_DateNull))
-    OR(COALESCE(:old.C_PERIOD_ID, 0) <> COALESCE(:new.C_PERIOD_ID, 0))
+    OR(COALESCE(:old.C_PERIOD_ID, '0') <> COALESCE(:new.C_PERIOD_ID, '0'))
     OR(COALESCE(:old.CURRENCYRATE, 0) <> COALESCE(:new.CURRENCYRATE, 0))
     OR(COALESCE(:old.CURRENCYRATETYPE, '.') <> COALESCE(:new.CURRENCYRATETYPE, '.'))
     OR(COALESCE(:old.CONTROLAMT, 0) <> COALESCE(:new.CONTROLAMT, 0))
-    OR(COALESCE(:old.AD_ORG_ID, 0) <> COALESCE(:new.AD_ORG_ID, 0))
-    OR(COALESCE(:old.AD_CLIENT_ID, 0) <> COALESCE(:new.AD_CLIENT_ID, 0))))
+    OR(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0'))
+    OR(COALESCE(:old.AD_CLIENT_ID, '0') <> COALESCE(:new.AD_CLIENT_ID, '0'))))
     THEN  RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
     END IF;
-  IF(:old.Posted='Y' AND ((COALESCE(:old.DATEACCT, v_DateNull) <> COALESCE(:new.DATEACCT, v_DateNull)) OR(COALESCE(:old.C_ACCTSCHEMA_ID, 0) <> COALESCE(:new.C_ACCTSCHEMA_ID, 0)) OR(COALESCE(:old.GL_CATEGORY_ID, 0) <> COALESCE(:new.GL_CATEGORY_ID, 0)) OR(COALESCE(:old.POSTINGTYPE, '.') <> COALESCE(:new.POSTINGTYPE, '.')))) THEN
+  IF(:old.Posted='Y' AND ((COALESCE(:old.DATEACCT, v_DateNull) <> COALESCE(:new.DATEACCT, v_DateNull)) OR(COALESCE(:old.C_ACCTSCHEMA_ID, '0') <> COALESCE(:new.C_ACCTSCHEMA_ID, '0')) OR(COALESCE(:old.GL_CATEGORY_ID, '0') <> COALESCE(:new.GL_CATEGORY_ID, '0')) OR(COALESCE(:old.POSTINGTYPE, '.') <> COALESCE(:new.POSTINGTYPE, '.')))) THEN
    RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
   END IF;
  END IF;