src-db/database/model/triggers/M_INVENTORY_TRG.xml
changeset 1605 8a0fe0193bef
parent 867 280dd3ba42a1
child 2078 cf88ca44cdd2
--- a/src-db/database/model/triggers/M_INVENTORY_TRG.xml	Wed Sep 03 17:10:52 2008 +0000
+++ b/src-db/database/model/triggers/M_INVENTORY_TRG.xml	Wed Sep 03 17:55:37 2008 +0000
@@ -32,10 +32,10 @@
   IF UPDATING THEN
     IF (:old.PROCESSED = 'Y' AND(
        (COALESCE(:old.MOVEMENTDATE, v_DateNull) <> COALESCE(:new.MOVEMENTDATE, v_DateNull))
-       OR (COALESCE(:old.AD_ORGTRX_ID, 0) <> COALESCE(:new.AD_ORGTRX_ID, 0))
-       OR (COALESCE(:old.M_WAREHOUSE_ID, 0) <> COALESCE(:new.M_WAREHOUSE_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
+       OR (COALESCE(:old.AD_ORGTRX_ID, '0') <> COALESCE(:new.AD_ORGTRX_ID, '0'))
+       OR (COALESCE(:old.M_WAREHOUSE_ID, '0') <> COALESCE(:new.M_WAREHOUSE_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;
   END IF;