store journals payroll.taxes_remitted; viewer tests for the numbers mutation found unchecked
check / check (push) Canceled after 0s

A payroll tax remittance was journaled as a plain entry, so the viewer
labeled it "Journal entry" and, at a 0.00 threshold, flagged it as
missing a receipt (the server posts it without one, like a payroll
run). The store now names it with payroll.taxes_remitted, as it names
runs with payroll.run; replay and the projection pass over it, and the
viewer's journal page describes it.

tests/view_model.rs: the cash history is never empty when cash moved
and ends on the last day it did; the prior month runs to the same day;
burn averages over only the months the books cover, half away from
zero; cash accounts found by name when the settings name none; card
accounts; each entry's accounts debits first, once each; only what
arrived since the last refresh is fresh; integrity counts files again
without rereading them; the invoice's customer, the bill payment's
vendor, payroll and remittance origins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-14 18:03:10 -06:00
1 parent f0fc725ca2
commit c1f92ed3e8
5 files changed
+341 -1

No files matched your search

+1 -1
View File
@@ -387,7 +387,7 @@ impl Books {
&self.settings.company.name
}
/// Cash balance at the end of each day it changed.
/// Cash balance at the end of each day a cash account moved.
pub fn cash_history(&self) -> Vec<(NaiveDate, Decimal)> {
balance_history(&self.ledger, &self.cash_accounts)
}
+8
View File
@@ -251,6 +251,14 @@ pub fn describe(b: &Books, line: &JournalLine) -> Option<Event> {
"Payroll run".into(),
entry_id.map(Route::Entry),
),
"payroll.taxes_remitted" => ev(
icon::BANK,
format!(
"Remitted payroll taxes ({})",
fmt::dollars(s(p, "total").parse().unwrap_or_default())
),
entry_id.map(Route::Entry),
),
"line.cleared" => ev(
icon::CHECK_SQUARE,
format!("Cleared a line of #{}", entry_id.unwrap_or(0)),