FA-59537 / Subscription proration billing / Member archive
Sales tax on proration credit and debit lines: subtotal composition · case 02
Non-taxable lines disappear from the invoice subtotal.
Case contract
Input {lines: [[signed cents, taxable]], rate_bp}. Tax is computed per taxable line, including negative credit lines (negative tax), each rounded half away from zero, then summed. Subtotal is the sum of all lines. Return [subtotal, tax, subtotal + tax].
Why this case matters
Credit lines on a prorated invoice must reverse the tax charged on the original period.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [0, 0, 0] | [-51735, 0, -51735] | 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 ↗