src-db/database/model/triggers/M_PRODUCTION_TRG.xml
changeset 1605 8a0fe0193bef
parent 756 ae11e4610537
child 1928 34cae22c29f7
equal deleted inserted replaced
1604:a1c518e6ed93 1605:8a0fe0193bef
    24     ************************************************************************/
    24     ************************************************************************/
    25 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
    25 v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
    26 BEGIN
    26 BEGIN
    27   IF (:old.PROCESSED = 'Y' AND(
    27   IF (:old.PROCESSED = 'Y' AND(
    28      (COALESCE(:old.MOVEMENTDATE, v_DateNull) <> COALESCE(:new.MOVEMENTDATE, v_DateNull))
    28      (COALESCE(:old.MOVEMENTDATE, v_DateNull) <> COALESCE(:new.MOVEMENTDATE, v_DateNull))
    29      OR (COALESCE(:old.AD_ORGTRX_ID, 0) <> COALESCE(:new.AD_ORGTRX_ID, 0))
    29      OR (COALESCE(:old.AD_ORGTRX_ID, '0') <> COALESCE(:new.AD_ORGTRX_ID, '0'))
    30      OR (COALESCE(:old.DOCUMENTNO, '0') <> COALESCE(:new.DOCUMENTNO, '0')))) THEN
    30      OR (COALESCE(:old.DOCUMENTNO, '0') <> COALESCE(:new.DOCUMENTNO, '0')))) THEN
    31     RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
    31     RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
    32   END IF;
    32   END IF;
    33 END M_PRODUCTION_TRG
    33 END M_PRODUCTION_TRG
    34 ]]></body>
    34 ]]></body>