The final month takes what the months before leave, spread over its days; a disposed asset stops on its disposal day. A skipped month is caught up in the month the run is made; a reversed run un-posts its month. New schedules spread by day; equal-months schedules must start on the 1st. Amounts round to the currency's own minor unit. Kani and Lean proofs; an exhaustive search over runs, reversals and disposals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
122 lines
2.9 KiB
TOML
122 lines
2.9 KiB
TOML
id = "depreciation-run-reversed-after-its-month"
|
|
title = "A run reversed after its month ended is caught up in the reversal's month, never posted twice"
|
|
rule = "What the books carry is read entry by entry, each in its own month: a run reversed after its month ended still carried that month at its end, so running the month again posts nothing, and the run of the reversal's month catches the month up."
|
|
status = "CHOICE"
|
|
sources = ["ASC 360-10-35-4", "DECISION: plan/served.md P3, Settled in design (2026-10-20)", "docs/spec/rules.md B-9"]
|
|
tags = ["depreciation", "catch-up", "reversal", "p3"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "01-01"
|
|
basis = "accrual"
|
|
rounding = "half-away-from-zero"
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Bank"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "1500"
|
|
name = "Equipment"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "1510"
|
|
name = "Accumulated Depreciation"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "3000"
|
|
name = "Capital"
|
|
type = "equity"
|
|
|
|
[[setup.accounts]]
|
|
code = "6200"
|
|
name = "Depreciation Expense"
|
|
type = "expense"
|
|
|
|
# Asset X: 12,000.00, no salvage, 12 months from 2026-01-01 (1,000.00 a
|
|
# month; December the final month).
|
|
[[setup.assets]]
|
|
id = "X"
|
|
description = "Asset X"
|
|
cost = "12000.00"
|
|
salvage = "0.00"
|
|
life_months = 12
|
|
in_service = "2026-01-01"
|
|
method = "straight_line"
|
|
cost_account = "1500"
|
|
accumulated_account = "1510"
|
|
expense_account = "6200"
|
|
|
|
[[events]]
|
|
date = "2026-01-01"
|
|
description = "Capital"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "12000.00" },
|
|
{ account = "3000", side = "credit", amount = "12000.00" },
|
|
]
|
|
|
|
[[events]]
|
|
date = "2026-01-01"
|
|
description = "Bought asset X"
|
|
lines = [
|
|
{ account = "1500", side = "debit", amount = "12000.00" },
|
|
{ account = "1000", side = "credit", amount = "12000.00" },
|
|
]
|
|
|
|
[[events]]
|
|
run_depreciation = { asset = "X", period = "2026-01" }
|
|
|
|
# January's run reversed on 2026-02-02, after January ended.
|
|
[[events]]
|
|
date = "2026-02-02"
|
|
description = "Reverse event 3"
|
|
reverses = 3
|
|
|
|
# January run again: nothing is due (Jan 31 carried January).
|
|
[[events]]
|
|
run_depreciation = { asset = "X", period = "2026-01" }
|
|
|
|
[[events]]
|
|
run_depreciation = { asset = "X", period = "2026-02" }
|
|
|
|
# Hand check (worked without the code): January's run (1,000.00, dated Jan
|
|
# 31) stood on Jan 31, so the books carried the schedule there, 1,000.00;
|
|
# running January again posts 0.00 (were it to post, Jan 31 would carry
|
|
# 2,000.00). The reversal took 1,000.00 away on Feb 2, so February's run
|
|
# posts the schedule through Feb 28, 2,000.00, less the 0.00 then carried:
|
|
# 2,000.00, of which 1,000.00 is January caught up.
|
|
[[expect]]
|
|
query = "run"
|
|
event = 5
|
|
|
|
[expect.values]
|
|
amount = "0.00"
|
|
caught_up = "0.00"
|
|
|
|
[[expect]]
|
|
query = "run"
|
|
event = 6
|
|
|
|
[expect.values]
|
|
amount = "2000.00"
|
|
caught_up = "1000.00"
|
|
|
|
[[expect]]
|
|
query = "balances"
|
|
as_of = "2026-01-31"
|
|
|
|
[expect.values]
|
|
"1510" = "-1000.00"
|
|
"6200" = "1000.00"
|
|
|
|
[[expect]]
|
|
query = "balances"
|
|
as_of = "2026-02-28"
|
|
|
|
[expect.values]
|
|
"1510" = "-2000.00"
|
|
"6200" = "2000.00"
|