EARS: The system shall hold the amount paid for a service as a liability until the service reaches a final delivery status, and only then recognize it as revenue.
Story: As a revenue accountant, I want revenue recognized only when a service reaches a final status, and every payment accounted for, so that the books of each order balance.
Acceptance criteria:
-
ONE-809.1: While a paid service has not reached a final delivery status, the system shall hold the amount paid for it as a liability and recognize none of it as revenue.
-
ONE-809.2: When a paid service is DELIVERED, the system shall recognize the amount paid for it as revenue.
-
ONE-809.3: When a paid service reaches a final delivery status, the system shall hold none of the amount paid for it as a liability.
-
ONE-809.4: The system shall keep each order's payments equal to its refunds, plus the amount held as liability, plus the revenue recognized, plus the forfeited amounts.
-
ONE-809.5: The system shall never refund more for an order than was paid for it.
-
ONE-809.6: Where the airline checks the amounts of a cancellation, the system shall refuse a report whose refund, penalty and forfeited amount do not add up to the amount paid for the service.
The final statuses are those of ONE-103 (isFinal). Whether a final
status other than DELIVERED earns revenue, refunds the amount paid or keeps it
as a liability, and whether a penalty is recognized at cancellation, are a
reading of the sources (RevenueReading). Payments for a
service in a final status are refused, and a service is cancelled only before
it reaches one. The sources send payments, refunds, penalties and forfeited
amounts to accounting but state no balance, and do not say whether the
amounts of a cancellation must add up to what was paid; that is a reading too
(CancelCheck). The result is the books afterwards, or none
when the event is refused.