P3: depreciation straight-line by days through the final month, schedules by day (defects 22, 9, D-37)
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
This commit is contained in:
1 parent
249e216fc0
commit
aa884d35d1
14 files changed
+1573
-22
No files matched your search
@@ -0,0 +1,112 @@
|
||||
id = "depreciation-catch-up-month"
|
||||
title = "A month of depreciation skipped is caught up in the month the run is made"
|
||||
rule = "A depreciation run for a month posts everything the schedule says is due through that month's end that the books don't carry, so a skipped month is caught up in it, and a later run for the skipped month posts nothing."
|
||||
status = "CHOICE"
|
||||
sources = ["ASC 360-10-35-4", "DECISION: plan/served.md P3, Settled in design (2026-10-20)"]
|
||||
tags = ["depreciation", "catch-up", "skipped-month", "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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
# February is skipped; March is run.
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
# February run afterwards: nothing is due (March caught it up).
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
# Hand check (worked without the code): the schedule through Mar 31 is
|
||||
# 3 x 1,000.00 = 3,000.00; January's run carried 1,000.00, so March's run
|
||||
# posts 2,000.00 (its own 1,000.00 and February's, caught up). February's
|
||||
# run then posts 0.00: the books already carry the schedule through
|
||||
# February's end and beyond.
|
||||
[[expect]]
|
||||
query = "run"
|
||||
event = 4
|
||||
|
||||
[expect.values]
|
||||
amount = "2000.00"
|
||||
caught_up = "1000.00"
|
||||
|
||||
[[expect]]
|
||||
query = "run"
|
||||
event = 5
|
||||
|
||||
[expect.values]
|
||||
amount = "0.00"
|
||||
caught_up = "0.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-03-31"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "-3000.00"
|
||||
"6200" = "3000.00"
|
||||
@@ -0,0 +1,158 @@
|
||||
id = "depreciation-disposal-after-a-late-change-undone"
|
||||
title = "A disposal is taken once a late change to an earlier run is undone, on any later day"
|
||||
rule = "A disposal clears what the asset's runs carry now, so it waits until each run carries at the end of the disposal's month what it carries now. A reversal of an earlier run dated after that month is undone by reversing it, on any open day: the disposal month and the end are then right, and a later month end keeps the change and its correction as they were made."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4", "Pacioli 1494, ch. 31"]
|
||||
tags = ["depreciation", "disposal", "refusal", "reversal", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-04" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-05" }
|
||||
|
||||
# May's run reversed on Aug 1 (doubted). Its month, and July's, still
|
||||
# carried it at their ends.
|
||||
[[events]]
|
||||
date = "2026-08-01"
|
||||
description = "Reverse event 7"
|
||||
reverses = 7
|
||||
|
||||
# Disposed of 2026-06-15 for 7,000.00: refused. The disposal clears what
|
||||
# the runs carry now (January to April, 4,000.00) and would charge May
|
||||
# again at Jun 15, so June would end carrying 6,500.00 against a
|
||||
# schedule of 5,500.00. The refusal names May's run and the reversal.
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
refused = "depreciation_past_disposal"
|
||||
|
||||
# May was right: its reversal reversed on Sep 2 (August may be closed by
|
||||
# then; any open day undoes it).
|
||||
[[events]]
|
||||
date = "2026-09-02"
|
||||
description = "Reverse event 8"
|
||||
reverses = 8
|
||||
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
|
||||
# Hand check (worked without the code): the runs carry 5,000.00 at Jun 30
|
||||
# and now. Held through Jun 15: 5,000.00 + 1,000.00 x 15/30 = 5,500.00, so
|
||||
# the final depreciation is 500.00 and the disposal clears 5,500.00. Book
|
||||
# value 6,500.00; gain 7,000.00 - 6,500.00 = 500.00. August's end carries
|
||||
# May's reversal (accumulated depreciation a 1,000.00 debit, the expense
|
||||
# 4,500.00) and September's its correction, as they would without the
|
||||
# disposal.
|
||||
[[expect]]
|
||||
query = "disposal"
|
||||
asset = "X"
|
||||
|
||||
[expect.values]
|
||||
final_depreciation = "500.00"
|
||||
catch_up_depreciation = "0.00"
|
||||
excess_depreciation = "0.00"
|
||||
accumulated = "5500.00"
|
||||
book_value = "6500.00"
|
||||
gain_loss = "500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-06-30"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
"7100" = "500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-08-31"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "1000.00"
|
||||
"6200" = "4500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-09-30"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
@@ -0,0 +1,146 @@
|
||||
id = "depreciation-disposal-before-a-later-run"
|
||||
title = "A disposal dated before a later month's run is refused until that run is reversed"
|
||||
rule = "A disposal is refused while a run of a month after the disposal's stands: crediting it back at the disposal day would leave the disposal month's accumulated depreciation a debit and its expense short at the month's end. Once that run is reversed, the disposal takes the depreciation of the days held."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "disposal", "refusal", "later-run", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-04" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-05" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-06" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-07" }
|
||||
|
||||
# Disposed of 2026-06-15 for 7,000.00, after July's run: refused, naming
|
||||
# July's run.
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
refused = "depreciation_past_disposal"
|
||||
|
||||
# July's run reversed, dated in July.
|
||||
[[events]]
|
||||
date = "2026-07-31"
|
||||
description = "Reverse event 9"
|
||||
reverses = 9
|
||||
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
|
||||
# Hand check (worked without the code): January through June carry
|
||||
# 6,000.00 once July's run is reversed. Held through Jun 15: 5,000.00 +
|
||||
# 1,000.00 x 15/30 = 5,500.00, so June's run posted 500.00 past the
|
||||
# disposal day. Book value 6,500.00; gain 7,000.00 - 6,500.00 = 500.00.
|
||||
# Had the disposal taken July's run back at Jun 15 (1,500.00 credited),
|
||||
# June would end with accumulated depreciation a 1,000.00 debit and
|
||||
# 4,500.00 of expense.
|
||||
[[expect]]
|
||||
query = "disposal"
|
||||
asset = "X"
|
||||
|
||||
[expect.values]
|
||||
final_depreciation = "0.00"
|
||||
catch_up_depreciation = "0.00"
|
||||
excess_depreciation = "500.00"
|
||||
accumulated = "6000.00"
|
||||
book_value = "6500.00"
|
||||
gain_loss = "500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-06-30"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
"7100" = "500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-07-31"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
@@ -0,0 +1,136 @@
|
||||
id = "depreciation-disposal-in-final-month"
|
||||
title = "A disposal in the life's final month depreciates that month by its days held"
|
||||
rule = "A disposal dated inside an asset's final month takes depreciation for the days held in that month, not the month's whole charge."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "disposal", "final-month", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-04" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-05" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-06" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-07" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-08" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-09" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-10" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-11" }
|
||||
|
||||
# Disposed of 2026-12-10 for 1,000.00.
|
||||
[[events]]
|
||||
date = "2026-12-10"
|
||||
dispose_asset = { asset = "X", proceeds = "1000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
|
||||
# Hand check (worked without the code): January..November run, 11,000.00.
|
||||
# December held through the 10th: 1,000.00 x 10/31 = 322.580... -> 322.58.
|
||||
# Accumulated 11,322.58; book value 677.42; gain 1,000.00 - 677.42 =
|
||||
# 322.58. (Before P3: 1,000.00 of depreciation and a 1,000.00 gain.)
|
||||
[[expect]]
|
||||
query = "disposal"
|
||||
asset = "X"
|
||||
|
||||
[expect.values]
|
||||
final_depreciation = "322.58"
|
||||
catch_up_depreciation = "0.00"
|
||||
excess_depreciation = "0.00"
|
||||
accumulated = "11322.58"
|
||||
book_value = "677.42"
|
||||
gain_loss = "322.58"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-12-31"
|
||||
|
||||
[expect.values]
|
||||
"1000" = "1000.00"
|
||||
"1510" = "0.00"
|
||||
"6200" = "11322.58"
|
||||
"7100" = "322.58"
|
||||
@@ -0,0 +1,122 @@
|
||||
id = "depreciation-disposal-inside-a-posted-month"
|
||||
title = "A disposal inside a month already run takes back the days after it"
|
||||
rule = "When a month's depreciation was posted through its end and the asset is disposed of inside that month, the disposal credits back the depreciation for the days after the disposal day, so book value and gain are of the days held."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "disposal", "mid-month", "excess-depreciation", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-04" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-05" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-06" }
|
||||
|
||||
# Disposed of 2026-06-15 for 7,000.00, after June's run (dated Jun 30).
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
|
||||
# Hand check (worked without the code): the runs carried 6,000.00. Held
|
||||
# through Jun 15: 5,000.00 + 1,000.00 x 15/30 = 5,500.00, so 500.00 was
|
||||
# posted past the disposal day. The disposal entry: Dr accumulated
|
||||
# depreciation 6,000.00, Dr bank 7,000.00 / Cr equipment 12,000.00, Cr
|
||||
# depreciation expense 500.00, Cr gain 500.00 (13,000.00 a side). Book
|
||||
# value 6,500.00; gain 7,000.00 - 6,500.00 = 500.00.
|
||||
[[expect]]
|
||||
query = "disposal"
|
||||
asset = "X"
|
||||
|
||||
[expect.values]
|
||||
final_depreciation = "0.00"
|
||||
catch_up_depreciation = "0.00"
|
||||
excess_depreciation = "500.00"
|
||||
accumulated = "6000.00"
|
||||
book_value = "6500.00"
|
||||
gain_loss = "500.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-06-30"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
"7100" = "500.00"
|
||||
@@ -0,0 +1,134 @@
|
||||
id = "depreciation-disposal-mid-month"
|
||||
title = "A disposed asset depreciates through its disposal day, and its schedule stops there"
|
||||
rule = "An asset disposed of mid-month is depreciated through the disposal day, held, and its schedule, accumulated depreciation and book value afterwards are what the disposal took."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "disposal", "mid-month", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-04" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-05" }
|
||||
|
||||
# Disposed of 2026-06-15 for 7,000.00.
|
||||
[[events]]
|
||||
date = "2026-06-15"
|
||||
dispose_asset = { asset = "X", proceeds = "7000.00", proceeds_account = "1000", gain_loss_account = "7100" }
|
||||
|
||||
# Hand check (worked without the code): January..May run, 5 x 1,000.00 =
|
||||
# 5,000.00. June held through the 15th: 1,000.00 x 15/30 = 500.00, the
|
||||
# final depreciation. Accumulated 5,500.00; book value 12,000.00 -
|
||||
# 5,500.00 = 6,500.00; gain 7,000.00 - 6,500.00 = 500.00.
|
||||
[[expect]]
|
||||
query = "disposal"
|
||||
asset = "X"
|
||||
|
||||
[expect.values]
|
||||
final_depreciation = "500.00"
|
||||
catch_up_depreciation = "0.00"
|
||||
excess_depreciation = "0.00"
|
||||
accumulated = "5500.00"
|
||||
book_value = "6500.00"
|
||||
gain_loss = "500.00"
|
||||
|
||||
# The disposed asset's schedule ends on the disposal day, whatever date it
|
||||
# is asked through.
|
||||
[[expect]]
|
||||
query = "depreciation_schedule"
|
||||
asset = "X"
|
||||
as_of = "2030-12-31"
|
||||
|
||||
[expect.values]
|
||||
"2026-06" = "500.00"
|
||||
accumulated = "5500.00"
|
||||
book_value = "6500.00"
|
||||
|
||||
# The books: depreciation expense 5,500.00 (debit), the gain 500.00
|
||||
# (credit), accumulated depreciation and equipment cleared, the bank
|
||||
# 7,000.00 (debit).
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-06-30"
|
||||
|
||||
[expect.values]
|
||||
"1000" = "7000.00"
|
||||
"1500" = "0.00"
|
||||
"1510" = "0.00"
|
||||
"6200" = "5500.00"
|
||||
"7100" = "500.00"
|
||||
@@ -0,0 +1,93 @@
|
||||
id = "depreciation-final-month-by-days"
|
||||
title = "Straight-line depreciation by the day through the life's final month"
|
||||
rule = "Depreciation through a day of an asset's final month is the depreciation before that month plus the final month's share for the days held, never the whole remaining cost."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "straight-line", "final-month", "p3-defect-22"]
|
||||
|
||||
[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. Its life is
|
||||
# 2026-01-01 through 2026-12-31; December is its 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" },
|
||||
]
|
||||
|
||||
# Hand check (worked without the code): 12,000.00 / 12 = 1,000.00 a month.
|
||||
# Through Dec 15: January..November, 11 x 1,000.00 = 11,000.00, plus
|
||||
# December's 1,000.00 x 15/31 = 483.870... -> 483.87 (half away from zero).
|
||||
# Accumulated 11,483.87; book value 12,000.00 - 11,483.87 = 516.13.
|
||||
[[expect]]
|
||||
query = "depreciation_schedule"
|
||||
asset = "X"
|
||||
as_of = "2026-12-15"
|
||||
|
||||
[expect.values]
|
||||
"2026-11" = "1000.00"
|
||||
"2026-12" = "483.87"
|
||||
accumulated = "11483.87"
|
||||
book_value = "516.13"
|
||||
|
||||
# Hand check: through the life's last day, the whole of it.
|
||||
[[expect]]
|
||||
query = "depreciation_schedule"
|
||||
asset = "X"
|
||||
as_of = "2026-12-31"
|
||||
|
||||
[expect.values]
|
||||
"2026-12" = "1000.00"
|
||||
accumulated = "12000.00"
|
||||
book_value = "0.00"
|
||||
@@ -0,0 +1,98 @@
|
||||
id = "depreciation-final-month-drift"
|
||||
title = "The final month of a mid-month life takes what the months before it leave, evenly over its days"
|
||||
rule = "When a life does not start on the 1st, its final month is charged the depreciable amount less what the months before it took, spread evenly over the final month's days."
|
||||
status = "CONVENTION"
|
||||
sources = ["ASC 360-10-35-4"]
|
||||
tags = ["depreciation", "straight-line", "final-month", "month-length-drift", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
# Cost 1,030.00, salvage 100.00 (930.00 to depreciate), 3 months from
|
||||
# 2026-01-15: the life is 2026-01-15 through 2026-04-14.
|
||||
[[setup.assets]]
|
||||
id = "D"
|
||||
description = "Asset D"
|
||||
cost = "1030.00"
|
||||
salvage = "100.00"
|
||||
life_months = 3
|
||||
in_service = "2026-01-15"
|
||||
method = "straight_line"
|
||||
cost_account = "1500"
|
||||
accumulated_account = "1510"
|
||||
expense_account = "6200"
|
||||
|
||||
[[events]]
|
||||
date = "2026-01-15"
|
||||
description = "Capital"
|
||||
lines = [
|
||||
{ account = "1000", side = "debit", amount = "1030.00" },
|
||||
{ account = "3000", side = "credit", amount = "1030.00" },
|
||||
]
|
||||
|
||||
[[events]]
|
||||
date = "2026-01-15"
|
||||
description = "Bought asset D"
|
||||
lines = [
|
||||
{ account = "1500", side = "debit", amount = "1030.00" },
|
||||
{ account = "1000", side = "credit", amount = "1030.00" },
|
||||
]
|
||||
|
||||
# Hand check (worked without the code): 930.00 / 3 = 310.00 a month.
|
||||
# January holds 17 of its 31 days: 310.00 x 17/31 = 170.00. February and
|
||||
# March are whole: 310.00 each. Before April: 790.00. April holds 14 days
|
||||
# (1-14) and is charged what is left, 930.00 - 790.00 = 140.00, evenly:
|
||||
# 10.00 a day (January's own daily rate, 310.00/31). Through Apr 13:
|
||||
# 130.00; accumulated 920.00; book value 1,030.00 - 920.00 = 110.00.
|
||||
[[expect]]
|
||||
query = "depreciation_schedule"
|
||||
asset = "D"
|
||||
as_of = "2026-04-13"
|
||||
|
||||
[expect.values]
|
||||
"2026-01" = "170.00"
|
||||
"2026-02" = "310.00"
|
||||
"2026-03" = "310.00"
|
||||
"2026-04" = "130.00"
|
||||
accumulated = "920.00"
|
||||
book_value = "110.00"
|
||||
|
||||
# Through Apr 14, the life's last day: April 140.00, accumulated 930.00,
|
||||
# book value 100.00 (the salvage, never depreciated).
|
||||
[[expect]]
|
||||
query = "depreciation_schedule"
|
||||
asset = "D"
|
||||
as_of = "2026-04-14"
|
||||
|
||||
[expect.values]
|
||||
"2026-04" = "140.00"
|
||||
accumulated = "930.00"
|
||||
book_value = "100.00"
|
||||
@@ -0,0 +1,114 @@
|
||||
id = "depreciation-reversal-before-its-run-is-refused"
|
||||
title = "A depreciation run can't be reversed on a day before its own"
|
||||
rule = "A correction comes after what it corrects: a depreciation run, or a reversal of one, can't be reversed on a day before its own. A run of March reversed on Jan 31 would leave January and February with negative depreciation."
|
||||
status = "AUTHORITY"
|
||||
sources = ["Pacioli 1494, ch. 31"]
|
||||
tags = ["depreciation", "reversal", "refusal", "p3-defect-22"]
|
||||
|
||||
[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"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "7100"
|
||||
name = "Gain or Loss on Disposal"
|
||||
type = "revenue"
|
||||
|
||||
# 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" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-02" }
|
||||
|
||||
[[events]]
|
||||
run_depreciation = { asset = "X", period = "2026-03" }
|
||||
|
||||
# March's run (dated Mar 31) reversed on Feb 10: refused, naming its date.
|
||||
[[events]]
|
||||
date = "2026-02-10"
|
||||
description = "Reverse event 5"
|
||||
reverses = 5
|
||||
refused = "entry_irreversible"
|
||||
|
||||
# On its own day it is taken.
|
||||
[[events]]
|
||||
date = "2026-03-31"
|
||||
description = "Reverse event 5"
|
||||
reverses = 5
|
||||
|
||||
# Hand check (worked without the code): January and February carry
|
||||
# 2,000.00 at February's end, never 1,000.00 (with March's 1,000.00 taken
|
||||
# away on Feb 10); March's end carries 2,000.00 (its run and its reversal
|
||||
# both dated Mar 31).
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-02-28"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "-2000.00"
|
||||
"6200" = "2000.00"
|
||||
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-03-31"
|
||||
|
||||
[expect.values]
|
||||
"1510" = "-2000.00"
|
||||
"6200" = "2000.00"
|
||||
@@ -0,0 +1,121 @@
|
||||
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"
|
||||
@@ -0,0 +1,75 @@
|
||||
id = "schedule-daily-deferred-revenue"
|
||||
title = "Deferred revenue is earned by the day, to the cent"
|
||||
rule = "Revenue collected in advance for a service over time is recognized as each day of the service passes, one posting per calendar month, the last month taking what the others leave."
|
||||
status = "CHOICE"
|
||||
sources = ["ASC 606-10-25-23", "DECISION: plan/served.md D-11, D-37 (owner, 2026-10-20)"]
|
||||
tags = ["schedules", "deferred-revenue", "daily", "p3-defect-9"]
|
||||
|
||||
[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 = "2400"
|
||||
name = "Deferred Revenue"
|
||||
type = "liability"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "4000"
|
||||
name = "Subscription Revenue"
|
||||
type = "revenue"
|
||||
|
||||
# 1,000.00 collected for service 2026-01-05 through 2026-04-04.
|
||||
[[setup.schedules]]
|
||||
id = "SUB"
|
||||
kind = "deferred_revenue"
|
||||
description = "Quarterly plan, a customer"
|
||||
total = "1000.00"
|
||||
start = "2026-01-05"
|
||||
months = 3
|
||||
convention = "daily"
|
||||
balance_account = "2400"
|
||||
pl_account = "4000"
|
||||
|
||||
[[events]]
|
||||
date = "2026-01-05"
|
||||
description = "Collected a quarter up front"
|
||||
lines = [
|
||||
{ account = "1000", side = "debit", amount = "1000.00" },
|
||||
{ account = "2400", side = "credit", amount = "1000.00" },
|
||||
]
|
||||
|
||||
[[events]]
|
||||
run_schedules = { through = "2026-04-30" }
|
||||
|
||||
# Hand check (worked without the code): January holds 27 of its 31 days
|
||||
# (5-31); February and March are whole; April holds days 1-4 and takes the
|
||||
# rest. Cumulative at each month end: 1,000 x (27/31)/3 = 290.3226 ->
|
||||
# 290.32; 1,000 x (27/31 + 1)/3 = 623.6559 -> 623.66; 1,000 x (27/31 +
|
||||
# 2)/3 = 956.9892 -> 956.99; then 1,000.00. Months: 290.32, 333.34,
|
||||
# 333.33, 43.01.
|
||||
[[expect]]
|
||||
query = "schedule_plan"
|
||||
schedule = "SUB"
|
||||
|
||||
[expect.values]
|
||||
"2026-01-31" = "290.32"
|
||||
"2026-02-28" = "333.34"
|
||||
"2026-03-31" = "333.33"
|
||||
"2026-04-30" = "43.01"
|
||||
|
||||
# Earned through March: 956.99; still owed for April 1-4: 43.01.
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-03-31"
|
||||
|
||||
[expect.values]
|
||||
"2400" = "43.01"
|
||||
"4000" = "956.99"
|
||||
@@ -0,0 +1,107 @@
|
||||
id = "schedule-daily-small-first-and-last-month"
|
||||
title = "A prepaid expense spread by the day: a small first and last month around full ones"
|
||||
rule = "A prepaid expense covering whole months from a mid-month start is expensed by the day: each full month an equal share, the first month its days' share, and the last month what the others leave, one posting per calendar month touched."
|
||||
status = "CHOICE"
|
||||
sources = ["ASC 340-10-05-4", "ASC 210-10-45-1(g)", "DECISION: plan/served.md D-11, D-37 (owner, 2026-10-20)"]
|
||||
tags = ["schedules", "prepaid-expense", "daily", "p3-defect-9"]
|
||||
|
||||
[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 = "1300"
|
||||
name = "Prepaid Expenses"
|
||||
type = "asset"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "3000"
|
||||
name = "Capital"
|
||||
type = "equity"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "6300"
|
||||
name = "Insurance"
|
||||
type = "expense"
|
||||
|
||||
# 1,200.00 of insurance covering 2026-03-15 through 2027-03-14.
|
||||
[[setup.schedules]]
|
||||
id = "INS"
|
||||
kind = "prepaid_expense"
|
||||
description = "Liability insurance"
|
||||
total = "1200.00"
|
||||
start = "2026-03-15"
|
||||
months = 12
|
||||
convention = "daily"
|
||||
balance_account = "1300"
|
||||
pl_account = "6300"
|
||||
|
||||
[[events]]
|
||||
date = "2026-03-15"
|
||||
description = "Capital"
|
||||
lines = [
|
||||
{ account = "1000", side = "debit", amount = "1200.00" },
|
||||
{ account = "3000", side = "credit", amount = "1200.00" },
|
||||
]
|
||||
|
||||
[[events]]
|
||||
date = "2026-03-15"
|
||||
description = "Paid a year of insurance"
|
||||
lines = [
|
||||
{ account = "1300", side = "debit", amount = "1200.00" },
|
||||
{ account = "1000", side = "credit", amount = "1200.00" },
|
||||
]
|
||||
|
||||
[[events]]
|
||||
run_schedules = { through = "2027-03-31" }
|
||||
|
||||
# Hand check (worked without the code): 1,200.00 / 12 = 100.00 a month.
|
||||
# March 2026 holds 17 of its 31 days (15-31): 100.00 x 17/31 = 54.838...
|
||||
# -> 54.84. April 2026 through February 2027 are whole: 100.00 each, 11 of
|
||||
# them (cumulatives 154.84 ... 1,154.84). March 2027 holds days 1-14 and
|
||||
# takes what is left: 1,200.00 - 1,154.84 = 45.16 (= 100.00 x 14/31 to the
|
||||
# cent). Thirteen month ends for a twelve-month policy.
|
||||
[[expect]]
|
||||
query = "schedule_plan"
|
||||
schedule = "INS"
|
||||
|
||||
[expect.values]
|
||||
"2026-03-31" = "54.84"
|
||||
"2026-04-30" = "100.00"
|
||||
"2026-05-31" = "100.00"
|
||||
"2026-06-30" = "100.00"
|
||||
"2026-07-31" = "100.00"
|
||||
"2026-08-31" = "100.00"
|
||||
"2026-09-30" = "100.00"
|
||||
"2026-10-31" = "100.00"
|
||||
"2026-11-30" = "100.00"
|
||||
"2026-12-31" = "100.00"
|
||||
"2027-01-31" = "100.00"
|
||||
"2027-02-28" = "100.00"
|
||||
"2027-03-31" = "45.16"
|
||||
|
||||
# Through June 2026 the books have expensed 54.84 + 3 x 100.00 = 354.84,
|
||||
# and 845.16 is still prepaid.
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2026-06-30"
|
||||
|
||||
[expect.values]
|
||||
"1300" = "845.16"
|
||||
"6300" = "354.84"
|
||||
|
||||
# Through March 2027, all of it.
|
||||
[[expect]]
|
||||
query = "balances"
|
||||
as_of = "2027-03-31"
|
||||
|
||||
[expect.values]
|
||||
"1300" = "0.00"
|
||||
"6300" = "1200.00"
|
||||
@@ -0,0 +1,63 @@
|
||||
id = "schedule-equal-months-start-on-the-first"
|
||||
title = "An equal-months schedule starts on the 1st of a month"
|
||||
rule = "A schedule that spreads its total in equal months must start on the 1st of a month, for prepaid expenses and deferred revenue alike, so it never recognizes days it does not cover."
|
||||
status = "CHOICE"
|
||||
sources = ["ASC 606-10-25-23", "DECISION: plan/served.md D-37 (owner, 2026-10-20)"]
|
||||
tags = ["schedules", "monthly-even", "refusal", "p3-defect-9"]
|
||||
|
||||
[setup]
|
||||
currency = "USD"
|
||||
fiscal_year_start = "01-01"
|
||||
basis = "accrual"
|
||||
# Equal months keep the rounding schedules had before P3 (each month the
|
||||
# total over the months to the cent, ties to even; the last month takes
|
||||
# what the others leave): a posted month's replay re-derives its plan.
|
||||
rounding = "half-even"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "1300"
|
||||
name = "Prepaid Expenses"
|
||||
type = "asset"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "2400"
|
||||
name = "Deferred Revenue"
|
||||
type = "liability"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "4000"
|
||||
name = "Subscription Revenue"
|
||||
type = "revenue"
|
||||
|
||||
[[setup.accounts]]
|
||||
code = "6300"
|
||||
name = "Insurance"
|
||||
type = "expense"
|
||||
|
||||
# Equal months from March 15: refused (it would recognize all of March's
|
||||
# 100.00, 45.16 of it, March 1 to 14 at 100.00 × 14/31, before the service
|
||||
# began). The refusal names the 1st.
|
||||
[[events]]
|
||||
register_schedule = { id = "MID", kind = "deferred_revenue", description = "Annual plan", total = "1200.00", start = "2026-03-15", months = 12, convention = "monthly_even", balance_account = "2400", pl_account = "4000" }
|
||||
refused = "invalid_schedule"
|
||||
|
||||
# The same for a prepaid expense: one rule for both.
|
||||
[[events]]
|
||||
register_schedule = { id = "MIDP", kind = "prepaid_expense", description = "Insurance", total = "1200.00", start = "2026-03-15", months = 12, convention = "monthly_even", balance_account = "1300", pl_account = "6300" }
|
||||
refused = "invalid_schedule"
|
||||
|
||||
# From the 1st it is taken: twelve equal months.
|
||||
[[events]]
|
||||
register_schedule = { id = "FIRST", kind = "deferred_revenue", description = "Annual plan", total = "1200.00", start = "2026-03-01", months = 12, convention = "monthly_even", balance_account = "2400", pl_account = "4000" }
|
||||
|
||||
# Hand check (worked without the code): 1,200.00 / 12 = 100.00, every
|
||||
# month, the last absorbing no rounding.
|
||||
[[expect]]
|
||||
query = "schedule_plan"
|
||||
schedule = "FIRST"
|
||||
|
||||
[expect.values]
|
||||
"2026-03-31" = "100.00"
|
||||
"2026-09-30" = "100.00"
|
||||
"2027-02-28" = "100.00"
|
||||
total = "1200.00"
|
||||
Reference in new issue
Block a user