FAILURE MAP
← Case archive

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

Straight-line depreciation journal: accumulated cap · case 04

Mid-month assets depreciate below salvage value in the final month.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

x = {'cost', 'salvage', 'life_months', 'start_month', 'convention': 'full_month'|'mid_month'|'next_month', 'through': last month to post}. Depreciable base = cost - salvage. The first charge month is start_month (start_month + 1 for next_month). Charges use cumulative rounding: target accumulated after the j-th charge month is round(base*j/life) or, for mid_month, round(base*(2j-1)/(2*life)), half-up and capped at base; each month posts target - accumulated. Posting stops after 'through' or once accumulated reaches base. Return {'schedule': [[month, amount]], 'accumulated', 'book_value': cost - accumulated}.

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: accumulated cap{"accumulated": 36000, "book_value": 0, "schedule": [[10, 2571], [11, 5142], [12, 5142], [13, 5142], [14, 5141], [15, 5142], [16, 5142], [17, 2578]]}{"accumulated": 35993, "book_value": 7, "schedule": [[10, 2571], [11, 5142], [12, 5142], [13, 5142], [14, 5141], [15, 5142], [16, 5142], [17, 2571]]}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 ↗