Add a new UserGroupRight to control access to open/close months.
[capital-apms-progress.git] / trigger / wrinvlne.p
blobd85fbb53f2e3bb7e8dda4b3ef8cb71301b85721f
1 TRIGGER PROCEDURE FOR WRITE OF InvoiceLine OLD OldLine.
3 IF NEW InvoiceLine OR (OldLine.InvoiceNo <> InvoiceLine.InvoiceNo) THEN DO:
4 DEF BUFFER LastLine FOR InvoiceLine.
5 FIND LAST LastLine NO-LOCK WHERE LastLine.InvoiceNo = InvoiceLine.InvoiceNo NO-ERROR.
6 InvoiceLine.LineSeq = (IF AVAILABLE(LastLine) THEN (LastLine.LineSeq + 1) ELSE 1).
7 END.