src-db/database/model/triggers/M_PRODUCTION_TRG.xml
changeset 1605 8a0fe0193bef
parent 756 ae11e4610537
child 1928 34cae22c29f7
--- a/src-db/database/model/triggers/M_PRODUCTION_TRG.xml	Wed Sep 03 17:10:52 2008 +0000
+++ b/src-db/database/model/triggers/M_PRODUCTION_TRG.xml	Wed Sep 03 17:55:37 2008 +0000
@@ -26,7 +26,7 @@
 BEGIN
   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.AD_ORGTRX_ID, '0') <> COALESCE(:new.AD_ORGTRX_ID, '0'))
      OR (COALESCE(:old.DOCUMENTNO, '0') <> COALESCE(:new.DOCUMENTNO, '0')))) THEN
     RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
   END IF;