FA-59529 / Subscription proration billing / Member archive
Sales tax on proration credit and debit lines: credit line tax reversal · case 04
Downgrade invoices over-collect tax because unused-time credits carry no tax reversal.
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 | [-64625, 4, -64621] | [-64625, -1792, -66417] | 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 ↗