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
7 ASSIGN RentCharge.SequenceCode
= IF AVAILABLE LastCharge
THEN
8 LastCharge.SequenceCode
+ 1 ELSE 1.