FAILURE MAP
← Case archive

FA-59694 / Subscription proration billing / Member archive

Volume discount tiers on quantity changes: tier threshold inclusion · case 04

Buying exactly the tier minimum does not unlock the discount.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {unit, old, new quantities, tiers: ascending [[min_qty, pct_off]], left, period}. A quantity's discount is the pct of the last tier with qty >= min_qty and applies to all units: total(q) = q*unit*(100-pct) in cent-percent. Proration of q = total(q)*left/(100*period) half-up. Return [-proration(old), proration(new)].

Why this case matters

Crossing a volume tier on a mid-cycle quantity change re-prices every unit for the rest of the period.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression 0[-24225, 25006][-24225, 22374]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗