Add a new UserGroupRight to control access to open/close months.
[capital-apms-progress.git] / trigger / wrvchlne.p
blob93163d2b82fb7720ae60403a7bd9d68305317cd0
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)
7 NO-LOCK NO-ERROR.
8 VoucherLine.LineSeq = (IF AVAILABLE(LastLine) THEN (LastLine.LineSeq + 1) ELSE 1).
9 END.