From 62e96556e5af5ddd5823025826a07d313017a936 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 18 Aug 2026 09:44:25 -0700 Subject: [PATCH] docs(reports): add a business-facing summary of the balancing work The existing reconciliation report is written for someone who will run the rollout and wants the evidence behind every figure. This one is for someone deciding whether it ships and what it is worth, and assumes no prior context. Structured around four business requirements rather than four defects, and states the operational cost in work rather than only in dollars: 1,191 restaurant-days needing manual investigation over ninety days becomes 122, of which only 32 are worth more than ten cents. Same measured figures throughout, three worked days, the duplicated- restaurant choice and why replaying beat retiring a record, and the three decisions still outstanding. About a third the length of the detailed report. Co-Authored-By: Claude Opus 5 --- ...6-08-16-sales-summary-business-impact.html | 423 ++++++++++++++++++ 1 file changed, 423 insertions(+) create mode 100644 docs/2026-08-16-sales-summary-business-impact.html diff --git a/docs/2026-08-16-sales-summary-business-impact.html b/docs/2026-08-16-sales-summary-business-impact.html new file mode 100644 index 00000000..78363eef --- /dev/null +++ b/docs/2026-08-16-sales-summary-business-impact.html @@ -0,0 +1,423 @@ +Restaurant Books That Balance + + + + + +
+ +
+
Sales summaries · measured on a copy of live data
+

Restaurant Books That Balance

+

Every trading day, each restaurant's books should show the money taken and the + money earned agreeing to the penny. On roughly one day in sixteen they did not. This is what was + wrong, what it was costing, and what the fix is worth — measured by running the real job over + ninety days of real trading.

+
+ Period 10 May – 7 Aug 2026 + Restaurants 210 + Restaurant-days 18,900 + Nothing live was changed +
+
+ +
+
+
+ Books as they stand + $70,276.50 + 1,191 days that don't balance +
+ +
+ Same period, after the fix + $2,379.45 + 122 days that don't balance +
+
+ +
+
1,069days brought into balance
+
0days broken by the change
+
0correct days altered
+
96.6%of the discrepancy removed
+
+ +
+

Put plainly: on nine days out of ten that were wrong, the books now close. Of the 122 + days still open, only 32 are worth more than ten cents — the rest are till rounding.

+
+
+ +
+

What an unbalanced day costs

+
+

A day that does not balance cannot be signed off. Someone has to open it, compare it against + the till, and work out which figure is missing — and until they do, that restaurant's + period is not closed.

+

Across these ninety days that was 1,191 restaurant-days needing investigation — about + thirteen every single day. After the fix it is 122 across the whole period, and only 32 of + those are worth more than ten cents: roughly one day every third day that genuinely needs + a human.

+

The second cost is subtler and worse. Where the two records of a duplicated restaurant traded + figures between them, the same day could reconcile differently depending on when you looked. That + is not a number anyone can defend in a review, and it is the reason R2 is a requirement rather + than a nicety.

+
+
+
~13restaurant-days a day needing investigation, before
+
~1.4restaurant-days a day, after
+
90%less manual reconciliation
+
+
+ +
+

What the business needs from this

+
+

Four requirements. Everything below is judged against them.

+
+
+
R1
+
A day's books must balance. Money taken must equal money earned, to the penny. A day + that doesn't balance can't be signed off, and someone has to work out why by hand.
+
R2
+
Each restaurant's records must stay its own. A payment or refund must belong to one + restaurant and stop moving. Figures that change owner between reports can't be reconciled.
+
R3
+
Cancelling an order must not delete another restaurant's money. Removing a voided + order should affect that order only.
+
R4
+
When the numbers can't be trusted, that must show. A silently plausible figure is + worse than a visibly wrong one.
+
+
+ +
+

What was going wrong

+ +
+

Two records for one restaurant, fighting over the same money — R2, R3

+

Ten restaurants were set up twice in the system, as two separate customer + records, and both were importing from the same till. Because the two records competed for the + same payments and refunds, a refund could belong to one record in the morning and the other by + the afternoon. Over time this had moved 3,387 refunds, 4,069 payouts and 2,628 cash-drawer + shifts between records. Nineteen pairs have been affected historically; ten still share a + till today.

+

It also meant a single card payment could be attached to both records' copies + of an order. That is the R3 hazard: the nightly job removes orders the till reports as voided, + and removing an order removes its payments — so cancelling one restaurant's order could + quietly delete the other's payment. In a sample of 20,000 orders, 11,469 payments had two + owners.

+
+ +
+

Refunded tips still counted as income — R1

+

When a guest was refunded, the tip came back too. The summary kept crediting + the original tip, so the day showed income the restaurant no longer had.

+
+ +
+

Service charges collected but never recorded as earned — R1

+

A catering fee or auto-gratuity is charged inside the customer's card payment, + so it arrived as money taken — but nothing recorded it as money earned. Every order + carrying one left the day short by exactly that amount. This was the single largest cause.

+
+ +
+

Refunds arriving for restaurants whose sales were never imported — R4

+

A handful of records receive refunds while none of their sales reach the + system. Those days cannot balance, because half the transaction is not there. This one is + deliberately left visible rather than fixed — see below.

+
+
+ +
+

What the fix is worth

+
+

The real nightly job was run over the same ninety days twice — once as it behaves today, + once with the fixes on — against the same copy of live data. These are measured outcomes, + not estimates.

+
+
+ + + + + + + +
StageDays not balancingCleanDiscrepancy
Books as they stand1,19193.70%$70,276.50
Counting refunded tips correctly89095.29%$67,032.09
Recording service charges as earned12299.35%$2,379.45
+
+
+ + + + + + + +
ChangeDays fixedDays brokenCorrect days alteredMoney involved
Refunded tips30100$4,027.21
Service charges76800$64,752.64
Both together1,06900$67,897.05
+
+
+ Nothing that was already right was touched +

Of 18,900 restaurant-days, 17,827 came out identical — not just still balancing, + but line for line the same figures. Every day that changed was already wrong. This was checked at + the level of individual lines (category, amount to the cent, and which account it posts to), not + just each day's bottom line, because a day can keep balancing while the figures inside it move.

+
+
+ +
+

What it looks like on a real day

+
+

Three days from the period. In each case the correction equals the discrepancy exactly — + which is what you would expect if the fix is recording something real that was recorded nowhere.

+
+ +
+ + + + + + + +
A catering fee — NGPA, 4 JuneBeforeAfter
Service chargesnot recorded1,344.86
Card payments16,914.2616,914.26
Day out by1,344.860.00
+
+

The guests paid the catering fee inside their card payments. Nothing in the + books said the restaurant had earned it, so the day was short by exactly the fee.

+ +
+ + + + + + + +
A refunded tip — NGFL, 19 MayBeforeAfter
Tips238.4670.42
Card refunds168.04168.04
Day out by−168.040.00
+
+

Guests were refunded $168.04, tips included. The books kept crediting the full + original tip. The corrected figure matches the refund to the penny.

+ +
+ + + + + + + +
One restaurant, two records — 11 MayRecord ARecord B
Orders that day221221
Refunds that daynone2 — $2,232.29
Day out by2,232.290.00
+
+

The same restaurant, twice in the system. Both records held the same 221 orders, + but the refunds existed only once. The record without them showed the sales being returned and no + refunds against them, and was out by exactly what its twin was holding. Across its whole history + that record held 158,535 orders and five refunds.

+
+ +
+

Making the duplicated restaurants whole

+
+

The duplicated restaurants needed more than the arithmetic fixes, and this is the part with a + real choice in it.

+

Orders were always recorded per customer record, so both copies of a restaurant built their + own order history. Refunds and payouts were not — only one record ever held each of them. + So one copy shows returns with no refunds against them, and the other looks fine.

+

Rather than invent duplicate records, the fix asks the till again. Once each record + carries its own identity, replaying ninety days of history means each one imports its own copy + and the two sets of books converge on their own — no code inventing figures that someone + then has to trust.

+
+
+
423days out of balance on these records, before
+
3days out of balance, after
+
$18,508discrepancy before
+
$649discrepancy after
+
+
+

The alternative was to retire one record of each pair. That was measured too, and it is worse: + it leaves 279 days and $7,790.54 open, and it forces a decision about whose trading history + to abandon. Replaying instead leaves 122 days and $2,379.45, and no record is lost.

+
+
+ A capped import, found while doing this +

The refund import asked the till for a restaurant's refunds and read only the first page of + the answer. The till sends a hundred at a time, so any location with more than a hundred refunds + silently returned a hundred — and the response looked complete. This was quietly + truncating the nightly refund import for every busy location, not only the duplicated ones. + Now fixed.

+
+
+ +
+

What is left, and what it is

+
+ + + + + + +
Remaining discrepancyDaysAmount
Real trading days — small, mostly rounding106$1,151.80
Refunds for restaurants whose sales never arrive16$1,227.65
+
+
+

Of the 106 trading days, only three are on the duplicated restaurants, and all three are + understood: two are a day where the till recorded $6,358.99 of card payments against $6,059.57 of + orders — a genuine gap in the till's own figures, not a fault in the books — and one + is an auto-gratuity booked as a service charge. The remaining 103 days come to $502.96 spread + across 190 restaurants, mostly a few cents each.

+

That $502.96 has been identical every time this was measured, across several rebuilds + with deliberately different preparation. It is the floor this work reaches.

+

The 16 remaining days belong to two restaurants — NG4S and + NGPS — that receive refunds while none of their sales are + imported. Their books cannot close until the sales arrive. These are deliberately left visibly + out of balance (R4). The arithmetic could be made to agree in one line, and that change was + written, measured and then removed: an unbalanced day is the only signal anyone gets that a + restaurant's sales are missing. Closing it would remove the alarm and leave the fire.

+
+
+ +
+

What rollout costs, and what it risks

+
+ + + + + + + + +
StepCostRisk
Deploy the changeminutesNone on its own — the two accounting changes are off per restaurant by default
Re-label existing records~38 minRuns with imports paused; newest month first, so stopping early is safe
Replay 90 days for the 10 duplicated restaurants~5.9 hrsOvernight job; reads from the till only
Recompute the books, then switch on per restaurant~25 minReversible — switching a restaurant back off restores today's behaviour exactly
+
+
+

The whole sequence is one overnight maintenance window. No customer record is retired and no + trading history is discarded. The accounting changes go on a few restaurants at a time, and + switching one back off is the rollback.

+
+
+ +
+

Three decisions needed

+
+
Accounting
+
Which revenue account service charges post to. Currently 49000 + Service Income, chosen so the work could be measured. It affects how revenue is reported, + never whether a day balances. Needs sign-off before switching any restaurant on.
+
Operations
+
Why NG4S and NGPS receive refunds but + no sales. 160 refunds worth $4,347.68 predate any order for these restaurants. Replaying + their history from the till is the cheap first thing to try — it is what resolved seven + similar cases.
+
Reporting
+
Ten restaurants remain in the system twice, by design. Each copy now keeps complete, + correct books. If any report adds figures across customer records, one restaurant's takings would + be counted twice at that layer. Worth confirming before this ships.
+
+
+ + + +