test(core): golden file for date-range profit and loss
Add a golden for the P&L over [2026-01-01, 2026-01-31] on an extended copy of the hand-verified January fixture: the original five entries, plus a multi-leg equipment purchase, a January close, and a February entry. (The original fixture has no closing entry and no entry after an as-of date, so a copy was extended; the first five entries are unchanged.) Hand recomputation (plan/golden-worksheets/profit-and-loss-period.md): revenue account 4000 is credited 4,000 by the Jan 10 invoice; expense account 6000 is debited 800 by the Jan 15 rent. The Jan 31 closing entry (Dr revenue 4,000, Cr rent 800, Cr retained earnings 3,200) lies inside the range but is excluded because a close moves earnings rather than earning or spending, and the Feb 5 entry after the range is excluded too. So revenue 4,000.00, expenses 800.00, net income 3,200.00 -- exactly the 3,200 the close moved. The golden pins those numbers. Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
1 parent
d075235559
commit
05c4b16385
3 files changed
+241
No files matched your search
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"start": "2026-01-01",
|
||||
"end": "2026-01-31",
|
||||
"revenue": [
|
||||
{
|
||||
"code": "4000",
|
||||
"name": "Service Revenue",
|
||||
"amount": "4000"
|
||||
}
|
||||
],
|
||||
"expenses": [
|
||||
{
|
||||
"code": "6000",
|
||||
"name": "Rent Expense",
|
||||
"amount": "800"
|
||||
}
|
||||
],
|
||||
"total_revenue": "4000",
|
||||
"total_expenses": "800"
|
||||
}
|
||||
Reference in new issue
Block a user