Add a new UserGroupRight to control access to open/close months.
[capital-apms-progress.git] / trigger / denactrn.p
blob895f3f31a449ce0f59fa27b58a663f8b2227372f
1 TRIGGER PROCEDURE FOR DELETE OF NewAcctTrans.
3 FIND NewBatch OF NewAcctTrans NO-ERROR.
4 IF AVAILABLE(NewBatch) THEN
5 DO:
7 FIND NewDocument OF NewAcctTrans NO-LOCK NO-ERROR.
9 IF NOT AVAILABLE NewDocument OR /* It is being deleted */
11 /* just the transaction is being deleted and it is not part
12 of a receipts or payments banking document */
14 ( AVAILABLE NewDocument AND
15 LOOKUP( NewDocument.DocumentType, "RCBK,PYBK" ) = 0 ) THEN
17 ASSIGN NewBatch.Total = NewBatch.Total - NewAcctTrans.Amount.
19 END.