1 TRIGGER PROCEDURE FOR WRITE OF VoucherLine
OLD OldLine.
3 IF NEW(VoucherLine
) OR (VoucherLine.VoucherSeq
<> OldLine.VoucherSeq
) THEN DO:
4 DEF BUFFER LastLine
FOR VoucherLine.
5 FIND LAST LastLine
WHERE LastLine.VoucherSeq
= VoucherLine.VoucherSeq
6 AND RECID(LastLine
) <> RECID(VoucherLine
)
8 VoucherLine.LineSeq
= (IF AVAILABLE(LastLine
) THEN (LastLine.LineSeq
+ 1) ELSE 1).