FAILURE MAP
← Case archive

FA-58182 / Double-entry ledger accounting / Member archive

VAT invoice journal: half-cent tie · case 02

Tax on exact half-cent amounts is rounded down.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

x = {'mode': 'inclusive'|'exclusive', 'rounding': 'line'|'invoice', 'lines': [[amount, rate_bp, account]]}. Exclusive: tax = amount*bp/10000. Inclusive: tax = amount*bp/(10000+bp). Rounding is half-up to the cent, per line ('line', summed per rate) or once per rate on the summed amounts ('invoice'). Tax is keyed by str(rate_bp). Inclusive: receivable = sum amounts, net = receivable - total tax. Exclusive: net = sum amounts, receivable = net + total tax. Return {'receivable', 'net', 'tax'}.

Why this case matters

Ledger software must keep debits equal to credits and apply normal-balance, period and cutoff rules exactly; small sign or boundary slips silently misstate financial statements.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: half-cent tie{"net": 10304, "receivable": 12365, "tax": {"2000": 2058, "2100": 3}}{"net": 10303, "receivable": 12365, "tax": {"2000": 2059, "2100": 3}}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 ↗