1 TRIGGER PROCEDURE FOR DELETE OF NewAcctTrans.
3 FIND NewBatch
OF NewAcctTrans
NO-ERROR.
4 IF AVAILABLE(NewBatch
) THEN
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.