EARS: When the ORA cancels a clearance or the Clearance Manager settles, claws back or writes off money on it, the system shall move the clearance's status and amounts as the clearance statuses describe.
Story: As an airline, I want each clearance's status to say how much of it is settled, so that I can match every clearing to what I am owed.
Acceptance criteria:
-
ONE-804.1: When the ORA cancels an Accepted clearance, the system shall mark it Cancelled and refuse every clearing for it afterwards.
-
ONE-804.2: When a clearing pays all that is unsettled on a clearance, the system shall mark it Fully Settled if it was Accepted and Final Settlement otherwise.
-
ONE-804.3: When a clearing pays part of what is unsettled on a clearance, the system shall mark it Partially Settled and settle no more than the amount still unsettled.
-
ONE-804.4: When the Clearance Manager writes off a clearance, the system shall remove exactly the amount still unsettled.
-
ONE-804.5: The system shall keep the amounts settled on a clearance, less those clawed back, plus the amount unsettled and the amount written off, equal to its agreed amount.
A clearing that pays nothing toward an Accepted clearance marks it Not
Settled. Whether a clawed-back clearance can be settled again, and whether
Final Settlement can be clawed back, are a reading of the sources
(SettlementReading). The EasyPay statuses Funds Collected and Funds
Partially Collected are not modelled. The result is the record afterwards, or
none when the event is refused.