From 4b4fecb98e2e360f087ea73d34d3587ee80d4214 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Tue, 27 Oct 2026 13:27:27 -0600 Subject: [PATCH] feat(gui): the journal says a write-off in plain words (P4b S7) R-B: a new event type gets a describe arm, so the journal's list reads "Invoice 7 written off, 60.00" and opens the entry, rather than printing the type at a human. every_journal_event_has_plain_language_text scans store.rs for the types and fails on any without text. --- crates/ledger-gui/src/pages/journal.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/ledger-gui/src/pages/journal.rs b/crates/ledger-gui/src/pages/journal.rs index 67654c5..2424e0a 100644 --- a/crates/ledger-gui/src/pages/journal.rs +++ b/crates/ledger-gui/src/pages/journal.rs @@ -812,6 +812,14 @@ pub fn describe(b: &Books, line: &JournalLine) -> Option { format!("Bill paid, {}", amount(p)), entry_id.map(Route::Entry), ), + "invoice.written_off" => { + let invoice = p.get("invoice_id").and_then(|v| v.as_u64()).unwrap_or(id); + ev( + icon::HAND_COINS, + format!("Invoice {invoice} written off, {}", amount(p)), + entry_id.map(Route::Entry), + ) + } "period.created" => ev( icon::CALENDAR_PLUS, format!("Period {} created", s(p, "name")),