The CPA package's general-journal.iif now holds every posted entry through as_of (closing entries left out, D-36), written as plain ASCII with CR LF, DOCNUM the entry id, QuickBooks Desktop's field limits and subaccount types honoured, and every character written differently listed in the export's warnings and the README (grouped by substitution, TINs masked). The 1099 worksheet stops at as_of too. PDFs print CJK, Arabic, Hebrew, Thai and Devanagari (Noto fallbacks, OFL), and so does the viewer. has_full_tin reads Unicode separators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
120 lines
3.7 KiB
TOML
120 lines
3.7 KiB
TOML
# A report as of a day shows the books through that day, and nothing
|
|
# dated after it, however long after the day it is made.
|
|
#
|
|
# wanderbooks: P3 defect 21 (the CPA package's QuickBooks file held entries
|
|
# dated after the package's as_of); rules.md B-33; regression tests
|
|
# `every_file_in_an_as_of_package_stops_at_as_of` and
|
|
# `as_of_package_iif_stops_at_as_of` (ledger-package tests/package.rs).
|
|
#
|
|
# Expected values: trial_balance gives each account's balance, debit
|
|
# positive and credit negative, every account listed; profit_and_loss
|
|
# gives each revenue and expense account's activity for the period as a
|
|
# positive amount, and net_income (revenue less expenses).
|
|
|
|
id = "as-of-package-stops-at-as-of"
|
|
title = "A report as of a day leaves out what is dated after it"
|
|
rule = "A balance or report as of a day D MUST include every posted entry dated on or before D and MUST NOT include any entry dated after D, whenever it is produced; a period report through D covers the entries dated from the period's first day through D."
|
|
status = "CONVENTION"
|
|
sources = [
|
|
"IRS Publication 538 (Rev. January 2022), Tax year: \"A tax year is an annual accounting period for keeping records and reporting income and expenses.\" (docs/spec/sources/irs-periods-and-methods.md)",
|
|
"Pacioli, Summa de arithmetica (1494), ch. 36, the trial balance: the total of the debits equals the total of the credits (Geijsbeek translation, 1914; docs/spec/sources/pacioli-1494.md)",
|
|
]
|
|
tags = ["as-of", "trial-balance", "profit-and-loss", "reversal", "period-boundary"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "01-01"
|
|
basis = "accrual"
|
|
rounding = "half_away_from_zero"
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Checking"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "3000"
|
|
name = "Owner capital"
|
|
type = "equity"
|
|
|
|
[[setup.accounts]]
|
|
code = "4000"
|
|
name = "Sales"
|
|
type = "revenue"
|
|
|
|
[[setup.accounts]]
|
|
code = "6000"
|
|
name = "Rent"
|
|
type = "expense"
|
|
|
|
# 0
|
|
[[events]]
|
|
date = "2026-01-02"
|
|
description = "Owner contribution"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "10000.00" },
|
|
{ account = "3000", side = "credit", amount = "10000.00" },
|
|
]
|
|
|
|
# 1
|
|
[[events]]
|
|
date = "2026-02-01"
|
|
description = "Sale"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "4000.00" },
|
|
{ account = "4000", side = "credit", amount = "4000.00" },
|
|
]
|
|
|
|
# 2: dated the day itself, so in.
|
|
[[events]]
|
|
date = "2026-06-30"
|
|
description = "June rent"
|
|
lines = [
|
|
{ account = "6000", side = "debit", amount = "1200.00" },
|
|
{ account = "1000", side = "credit", amount = "1200.00" },
|
|
]
|
|
|
|
# 3: the day after, so out of anything as of 2026-06-30.
|
|
[[events]]
|
|
date = "2026-07-01"
|
|
description = "July rent"
|
|
lines = [
|
|
{ account = "6000", side = "debit", amount = "1200.00" },
|
|
{ account = "1000", side = "credit", amount = "1200.00" },
|
|
]
|
|
|
|
# 4: a reversal dated after the day leaves its original in.
|
|
[[events]]
|
|
date = "2026-07-15"
|
|
description = "Reversal of the February sale"
|
|
reverses = 1
|
|
lines = [
|
|
{ account = "4000", side = "debit", amount = "4000.00" },
|
|
{ account = "1000", side = "credit", amount = "4000.00" },
|
|
]
|
|
|
|
[[expect]]
|
|
query = "trial_balance"
|
|
from = "2026-01-01"
|
|
to = "2026-06-30"
|
|
values = { "1000" = "12800.00", "3000" = "-10000.00", "4000" = "-4000.00", "6000" = "1200.00" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
from = "2026-01-01"
|
|
to = "2026-06-30"
|
|
values = { "4000" = "4000.00", "6000" = "1200.00", net_income = "2800.00" }
|
|
|
|
# The same books a month later: the July rent and the reversal are in.
|
|
[[expect]]
|
|
query = "trial_balance"
|
|
from = "2026-01-01"
|
|
to = "2026-07-31"
|
|
values = { "1000" = "7600.00", "3000" = "-10000.00", "4000" = "0.00", "6000" = "2400.00" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
from = "2026-01-01"
|
|
to = "2026-07-31"
|
|
values = { "4000" = "0.00", "6000" = "2400.00", net_income = "-2400.00" }
|