feat(shift): confirm-before-close with X-report + split tickets vs subscriptions; fix dark <select>
CI / check (push) Failing after 31s
CI / check (push) Failing after 31s
Three changes: 1. Confirm-before-close. The header shift button closed the shift directly — a stray click would sign the irreversible Z-report. It now opens a confirm modal showing the live X-report (takings split by source + expected drawer) with Cancel / End-shift. Opening a shift stays immediate (no such risk). 2. Split takings by SOURCE. The report separates Tickets (transient) from Subscriptions (monthly sales + a subscriber's out-of-window charge), so the operator sees subscriber money apart from ticket money. Buckets are derived from the signed payment payload flags (subscriptionSale / subscriptionWindowCharge) and always reconcile to cash + card (a payment with neither flag is a ticket). Computed in #summariseWindow, carried on the signed shift_z_report payload, and shown in the X-report, the close modal, the shift history detail, and the printed Z-report. Reports predating the fields default subscription to 0 (ticket absorbs the whole take), so old shifts still reconcile. 3. Fix dark-theme native <select> popups rendering WHITE on WebKitGTK (the Tauri Linux WebView): set color-scheme dark/light on <html> per theme + explicit <option> colours, so the OS-drawn dropdown list follows the theme. Verified the split on a read-only DB copy: tickets 0, subscriptions 10,200 (10,000 sale + 200 out-of-window), reconciles to cash+card. build+lint 14/14, i18n parity (sq+en). Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
This commit is contained in:
@@ -80,6 +80,19 @@ login ————————————————————————
|
||||
That's the whole human-side requirement: **print the cash and the POS (if any).** No blind count,
|
||||
no variance gate, no manager override.
|
||||
|
||||
> **Takings split by SOURCE + confirm-before-close (2026-06-21).** Two related changes:
|
||||
> 1. The report now splits takings into **Tickets** (transient) vs **Subscriptions** (monthly
|
||||
> `subscriptionSale` + a subscriber's out-of-window `subscriptionWindowCharge`), so the operator
|
||||
> sees subscriber money apart from ticket money. The buckets are derived from the signed payment
|
||||
> payload flags and always reconcile to `cash + card` (a payment with neither flag is a ticket).
|
||||
> Computed once in `#summariseWindow`, carried on the signed `shift_z_report` payload
|
||||
> (`ticketTotalMinor`/`subscriptionTotalMinor`/`subscriptionSalesMinor`/`subscriptionWindowMinor`),
|
||||
> shown in the X-report, the close modal, the history detail, and the printed Z-report; old reports
|
||||
> that predate the fields default subscription to 0 (ticket absorbs the whole take).
|
||||
> 2. The **header shift button no longer closes directly** — a stray click would sign an irreversible
|
||||
> Z-report. It opens a **confirm modal showing the live X-report** (the source split + expected
|
||||
> drawer) with Cancel / End-shift. Opening a shift stays immediate (no such risk).
|
||||
|
||||
> **Z-report is now Albanian (2026-06-19).** The printed Z-report labels were hardcoded English
|
||||
> (`Operator:`/`From:`/`Cash:`) with raw ISO timestamps; now fully Albanian (`Operatori`/`Nga`/`Deri`/
|
||||
> `Para në dorë`/`-- Arka --`/`Arka e pritur`…) with the human date format `19 Qershor 2026 10:48:25`,
|
||||
|
||||
+12
@@ -1256,3 +1256,15 @@ Server-logged for audit. UI: admin-only "Versioni" picker in the edit modal, lis
|
||||
effective date + timeframe summary, current pre-selected. Verified on a writable DB copy: version
|
||||
changed, price + planId frozen, cross-plan rejected. build+lint 14/14, i18n parity (sq+en). Live DB
|
||||
untouched. See [[subscription]] "Version correction".
|
||||
|
||||
## [2026-06-21] feat | Shift report split (tickets vs subscriptions) + confirm-before-close + dark <select>
|
||||
Three UI/report changes. (1) The [[shift]] report now splits takings by SOURCE — Tickets (transient)
|
||||
vs Subscriptions (monthly sales + a subscriber's out-of-window charge), derived from the signed
|
||||
payment payload flags (subscriptionSale / subscriptionWindowCharge), always reconciling to cash+card.
|
||||
Carried on the signed shift_z_report payload + shown in X-report, close modal, history detail, and the
|
||||
printed Z-report; pre-split reports default subscription to 0. (2) The header shift button no longer
|
||||
closes directly — it opens a confirm modal showing the live X-report (the split + expected drawer)
|
||||
before signing the irreversible Z-report. Opening stays immediate. (3) Fixed dark-theme native
|
||||
<select> popups rendering WHITE on WebKitGTK (Tauri Linux) via color-scheme + explicit option colours.
|
||||
Verified the split on a read-only DB copy (tickets 0, subs 10,200 = 10,000 sale + 200 out-of-window,
|
||||
reconciles). build+lint 14/14, i18n parity (sq+en). See [[shift]] "Takings split by source".
|
||||
|
||||
Reference in New Issue
Block a user