Bubble tea end-of-shift cash-up tool (single-file) - cash, voucher redemptions, and refunds reconciled together, discrepancies visible on the spot instead of tomorrow
You are a coding agent building an internal tool for a
bubble tea shop. Build a single-file HTML tool (HTML/
CSS/JS all inline, no external dependencies, no network
requests, opens by double-click) for cashier end-of-shift
cash-up.
Reconciliation logic (build this in):
- Cash line: POS cash due minus float = cash expected
in drawer; compare against counted cash; difference
is over/short
- Voucher line: voucher redemptions per channel
(group-buy / review-site / short-video / member
free-drink, itemized) each compared against the
platform's backend count; difference is over- or
under-redeemed
- Delivery line: delivery orders are prepaid online -
reconcile ticket counts only; if any
pay-on-delivery exists, give it its own row
- Refund & remake line: every refund and remake in the
shift must have a log entry; refunds without one get
a red "manager to verify" flag
Input section:
- POS shift summary (cash due, mobile payments,
delivery ticket count, voucher redemptions per
channel - manual entry)
- Counted cash: a denomination counter (number of
notes/coins per denomination, auto-summed)
- Float amount, over/short alert threshold (cashier
can change the default)
- Shift refund & remake log (ticket number, amount,
reason dropdown: keyed wrong / made wrong / customer
cancelled / other)
Output section:
- Variance table: line / expected / actual /
difference / disposition (resolvable this shift |
escalate to manager)
- Differences past the threshold flagged red; when all
three lines balance, one green "balanced" row
- Handover sign-off block: print-space signature lines
for outgoing cashier / incoming cashier / manager
- "Export this shift" button: plain text, pasteable
into the handover notebook or staff group chat
Constraints:
- No accounts, no network, no cloud - data in
localStorage, last 30 shifts browsable, plus a
"clear" button
- Any field without data shows "pending" - never
filled with 0 or the previous shift's figure;
silent fallback is the one unforgivable behavior
here
- The tool's output stops at the variance table and
sign-off. Do not generate "financial advice" -
disposition is a human job.
- Layout must work one-handed on a phone in portrait
(the realistic context: phone browser next to the
register)
Why it is written this way
Reconciling all three money lines together reflects how errors actually behave in this trade: a group-buy voucher keyed in the POS but never redeemed on the platform, cash handed back to a customer while the system only partially reversed - each line looks clean alone, together they are five unaccounted units. The problem with manual cash-up is not arithmetic but remembering "which lines exist" after a brutal shift; the tool removes that memory burden.
The denomination counter standardizes the "counted" step. The first question when investigating an over/short is "miscounted or genuinely off?" - with per-denomination records, rechecking means re-counting one suspicious stack; without them, the whole drawer gets recounted, most people give up, and the discrepancy becomes a permanent mystery. The sign-off block serves the same purpose: a variance frozen on the spot with two signatures stays attributable; one carried into tomorrow is forever arguable.
"Pending" instead of silent fallback is the tool's honesty floor and its most important constraint. Padding an unreconciled field with zero or last shift's float makes the tool "always produce a result" while hiding differences inside defaults - and once a reconciliation tool has quietly balanced the books once, none of its "balanced" outputs can be trusted again.
Output stops at the variance table on purpose: a cashier needs "which line is off by how much, do I escalate or not." Investigation and disposition belong to the manager; a tool that reaches past that line just makes the cashier answerable for the tool's opinions.
Variables
| Variable | Notes |
|---|---|
| Float amount | The fixed change base that stays in the drawer each shift; reconcile only the excess. Change the number in the tool when the float policy changes, or every shift "loses" the same amount |
| Over/short threshold | Difference in currency units that triggers a red flag - set by cash volume; too tight and everything is red, too loose and the alert means nothing |