FA-59830 / Subscription proration billing / Member archive
Unused-time credit based on amount paid: credit basis · case 05
Customers who paid with a discount receive credits at the full list price.
Case contract
Input {list, paid, status paid|partial|open|void|refunded, left, period}. Open, void and refunded invoices earn no unused-time credit. Paid and partially paid invoices earn paid*left/period half-up (the amount actually collected, not the list price). Return cents.
Why this case matters
Credits for unused time must not exceed what the customer actually paid for the period.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | 2874 | 0 | 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 ↗