| edit widget del copy | ||||
| Content Page→ Our Journey - The Kitchen Pays Its Bills,admin1 | ||||
April 30 – May 2, 2026 • From shoebox to cut-the-check
In Chapter 8 the kitchen learned to read its receipts. Three weeks later, it crossed a harder line: it learned to pay them. What had started as a way to keep a bookkeeper’s shoebox in order grew, in three days, into a real accounting workflow — reimbursement batches, multi-stage check requests, an audit trail that survives the people who built it.
Apr 30 — the warm-up
The week opened with something almost playful: a Pamphlet Animated Viewer with full saddle-stitch imposition. The Living Room Ministries pamphlet learned to fold itself onscreen the way it would fold in a parishioner’s hands — outer spread, inner spread, page turns in the right order. A small thing. A signal that the platform was ready to take on something larger.
May 1 — the build, the crash, the catch
On the evening of May 1, Kitchen Check Requests shipped. A reimbursement batch could be opened, line items attached from existing receipts, totals computed automatically. A workflow with three honest stages: Draft, Submitted, Paid. Each stage with its own permissions, its own visibility, its own audit row.
John clicked it for the first time and the page crashed. The query had a SUM around a CASE expression that contained a correlated subquery with another aggregate inside it — perfectly readable as a sentence, perfectly illegal in SQL Server. The error read like a riddle. Within minutes the offender was rewritten as a derived-table JOIN: pre-aggregate the inner sum into a virtual table, then SUM the outer CASE against it. The page came back in under thirty seconds.
Aggregate-over-subquery-with-aggregate is illegal. SUM(CASE WHEN (SELECT SUM(...))...) won’t fly. The fix is mechanical: pre-aggregate via LEFT JOIN (SELECT id, SUM(x) FROM t GROUP BY id), then aggregate over the join. The lesson was logged the same hour, into the user-memory file Eli carries between sessions, so the next person to write that pattern would get caught before John did.
May 1 overnight, May 2 morning
John went to bed. Eli stayed up. The full payment system — pill-state filters, sub-pill counts, per-row check-request links, the “All” tab quietly renamed to “Active” so already-Submitted lines stopped re-appearing in the work queue — was finished by sunrise. May 2 opened with a working module John hadn’t seen yesterday.
“The grandmother who could barely use a computer doesn’t just enter receipts now — she cuts the church’s checks from her phone.” That sentence used to be a vision statement. By May 2 it was just a description.
Pamphlet Animated Viewer with saddle-stitch imposition; Kitchen Check Requests with multi-stage workflow (Draft → Submitted → Paid); Reimbursement Batches with auto-computed totals; CR sub-pills and per-row CR links on KitchenReceipts; nested-aggregate trap caught and converted to a permanent SQL Server lesson.
The shoebox is gone. The audit trail isn’t.