1 TRIGGER PROCEDURE FOR WRITE OF NewAcctTrans.
3 IF NEW NewAcctTrans
THEN
6 DEF BUFFER LastTrans
FOR NewAcctTrans.
7 DEF VAR trans-code
AS INT NO-UNDO.
9 FIND LAST LastTrans
WHERE
10 LastTrans.BatchCode
= NewAcctTrans.BatchCode
AND
11 LastTrans.DocumentCode
= NewAcctTrans.DocumentCode
14 trans-code
= IF AVAILABLE LastTrans
THEN
15 LastTrans.TransactionCode
+ 1 ELSE 1.
17 ASSIGN NewAcctTrans.TransactionCode
= trans-code.