src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml
changeset 1605 8a0fe0193bef
parent 756 ae11e4610537
child 2078 cf88ca44cdd2
--- a/src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml	Wed Sep 03 17:10:52 2008 +0000
+++ b/src-db/database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml	Wed Sep 03 17:55:37 2008 +0000
@@ -29,9 +29,9 @@
     IF UPDATING THEN
      IF (:old.Processed='Y'
         AND ((COALESCE(:old.STATEMENTDATE, v_DateNull) <> COALESCE(:new.STATEMENTDATE, v_DateNull))
-        OR(COALESCE(:old.C_BANKACCOUNT_ID, 0) <> COALESCE(:new.C_BANKACCOUNT_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))))
+        OR(COALESCE(:old.C_BANKACCOUNT_ID, '0') <> COALESCE(:new.C_BANKACCOUNT_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;