Make date field wider to accommodate 10 digits properly.
[capital-apms-progress.git] / trigger / wrrntchg.p
blobe7c5ff7fd79b96823885295c546b1b6b8db43dbe
1 TRIGGER PROCEDURE FOR WRITE OF RentCharge.
3 IF NEW RentCharge THEN DO:
4 DEF BUFFER LastCharge FOR RentCharge.
5 FIND LAST LastCharge WHERE LastCharge.TenancyLeaseCode = RentCharge.TenancyLeaseCode
6 NO-LOCK NO-ERROR.
7 ASSIGN RentCharge.SequenceCode = IF AVAILABLE LastCharge THEN
8 LastCharge.SequenceCode + 1 ELSE 1.
9 END.