PostgreSQL NUMERIC columns return as strings in node-postgres. denomTotal
was doing 0 + "40.00" + "30.00" → "040.0030.00", and parseFloat in
fmtGBP read only the first portion, giving a wrong total (£40.00 instead
of £78.80 etc).
Fix: coerce total_amount and value_entered to numbers in applyLoaded;
make denomTotal's reducer defensively use Number() so strings can't
silently break the sum again.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Cash summary: derive total_quantity from total_amount/denomination_value
so value_entered rows are counted (previously SUM(quantity) returned
NULL for those rows)
- Safe Count: moved safe_cash out of Float Management tabs into its own
/safe/* route with a dedicated sidebar entry (Vault icon)
- FloatManagement now only shows Petty Cash and Change Tin tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- On mount/date change: auto-fetch existing cash up
- Draft found → auto-load into editing state
- Finalised → auto-load into locked state (read-only + banner)
- Not found → show 'Start Cash Up' prompt
- Removed manual 'Load Existing' / 'New' buttons
- Submitting final transitions immediately to locked state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tab now moves down the Qty column first (£50→£20→...→1p), then down
the Value Override column, for both takings and float grids.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These were in the .env file but missing from docker-compose environment,
so process.env.SETTINGS_URL was undefined and newbook.js crashed on
URL construction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AuthGate was calling /cashup/api/auth/verify and /cashup/api/auth/login,
which hit the cashup backend (404). Should call /api/auth/* which NPM
routes to the central auth service, matching all other apps.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All @fastify/* plugins (cookie, cors, multipart, static) were already
on 5.x-targeted versions; fastify itself was still on 4.29.1.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add vite-env.d.ts for import.meta.env type support
- Remove unused imports: ChevronRight, useCallback (x2), today
- Silence unused attachments state read (keep setter for future use)
- Fix FloatManagement changeTinTargets reducer: drop unused k, fix v type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>