src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml
changeset 21737 fcb87e990fcd
parent 21682 337545057885
child 26421 908de9299675
equal deleted inserted replaced
21736:9fe57239e6a9 21737:fcb87e990fcd
    56         OR(COALESCE(:OLD.C_Costcenter_ID, '0') <> COALESCE(:NEW.C_Costcenter_ID, '0'))
    56         OR(COALESCE(:OLD.C_Costcenter_ID, '0') <> COALESCE(:NEW.C_Costcenter_ID, '0'))
    57         OR(COALESCE(:OLD.C_BPartner_ID, '0') <> COALESCE(:NEW.C_BPartner_ID, '0'))
    57         OR(COALESCE(:OLD.C_BPartner_ID, '0') <> COALESCE(:NEW.C_BPartner_ID, '0'))
    58         OR(COALESCE(:OLD.M_Product_ID, '0') <> COALESCE(:NEW.M_Product_ID, '0'))
    58         OR(COALESCE(:OLD.M_Product_ID, '0') <> COALESCE(:NEW.M_Product_ID, '0'))
    59         )) 
    59         )) 
    60         THEN RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
    60         THEN RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
    61       END IF;
    61       END IF;    
    62     
       
    63       IF (:old.c_currency_id <> :new.c_currency_id) THEN
       
    64         UPDATE gl_journalline SET c_currency_id = :new.c_currency_id where gl_journal_id = :old.gl_journal_id;
       
    65       END IF;
       
    66     END IF;
    62     END IF;
    67     IF(DELETING) THEN
    63     IF(DELETING) THEN
    68       IF(:old.Processed='Y') THEN
    64       IF(:old.Processed='Y') THEN
    69         RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
    65         RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
    70       END IF;
    66       END IF;