Commit graph

5 commits

Author SHA1 Message Date
f62aa6f347 Fix gross sales zero bug; add Excel stats bar
- Backend: sales_breakdown column matching was always failing because
  Newbook returns numeric gl_group_id but column settings use string codes
  like 'ACCOMMODATION'. Added normalised name-fuzzy fallback matching and
  a daily_gross_sales field that sums ALL earned revenue for the date,
  bypassing column config entirely.
- Frontend: dayGrossSales() now uses daily_gross_sales from backend first
- Add floating Excel-style status bar (bottom-right): when cells are
  selected it shows Count, Sum, and Average of the selected values;
  disappears when ✕ clicked or selection cleared

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 00:14:40 +00:00
4ea5238e62 Fix cash summary quantity bug; add Safe Count as own nav item
- 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>
2026-07-01 21:36:19 +00:00
b623f806d8 Pin all fastify plugins to 4.x-compatible versions
cookie v9 + cors v9 = Fastify 4.x
multipart v8 = Fastify 4.x (downgrade from v9 which targets 5.x)
static v7 = Fastify 4.x (downgrade from v8 which targets 5.x)
fastify reverted to 4.x

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:19:33 +00:00
fc6d1baa79 Upgrade fastify to 5.x to match plugin version requirements
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>
2026-07-01 20:14:46 +00:00
63a5a72fa3 Wire Newbook credentials to settings service 2026-07-01 19:33:16 +00:00