Problem/Motivation
A payment policy prices one unit and a line holds a quantity of them. The price scales with that quantity, since #3615260: An order's charged amount ignores the line quantity, so a two-ticket line is charged as one. The guarantee and the no-show fee do not: transactionGuaranteeTotal() and transactionNoShowTotal() sum one line amount once, however many units the line holds.
For the guarantee that is arguably right: it stands behind the resource being reserved rather than behind each unit of it, and two seats at one concert cannot be damaged twice over. For a no-show fee it is arguably wrong: two people who did not turn up are two no-shows.
And the answer depends on what the resource is. Three bicycles booked on one line are three damage risks; three seats are one.
Proposed resolution
To decide, in this order:
- Whether the no-show fee scales per unit. It is a claim per booking that did not happen, so probably yes.
- Whether the guarantee scales per unit, or whether that becomes a per-resource setting sitting beside the existing guarantee handling mode, so a resource can say which it is.
- What a held guarantee covers once the two disagree, since it has to cover the larger of the two claims it stands behind.
A related question, on the same argument: several lines of the same resource in one order each take their own guarantee today, because the total is summed per line. If a guarantee is unique per resource, that is over-sized too.
Remaining tasks
Decide, then implement with tests. The current behavior is pinned by a characterization test added in #3615260: An order's charged amount ignores the line quantity, so a two-ticket line is charged as one, so changing it is a visible change rather than a silent one.
User interface changes
Possibly a per-resource setting saying whether the guarantee is per unit or per booking.
API changes
To be decided.
Data model changes
To be decided.
Comments
Comment #2
mably commented