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,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"
|
||||
Reference in new issue
Block a user