ClubLedger/static
Claude 7fa74963b0
Replace overdraft checkbox with 5-option policy dropdown
Policies:
- never            – not allowed (default)
- always           – allowed for all charges
- staff_override   – default no; staff sees checkbox to allow per charge
- admin_override   – default no; only admins see the allow-per-charge checkbox
- staff_block      – default yes; staff sees checkbox to block per charge

Backend:
- CONFIG: allow_negative_balance → overdraft_policy: "never"
- migrate_db(): converts old allow_negative_balance setting in app_settings
  to the equivalent overdraft_policy value on first startup after upgrade
- ChargeRequest: new optional overdraft_override: bool = False
- POST /charge: full policy logic; admin_override enforced server-side
  so a non-admin can't bypass it by sending override=true
- POST /admin/settings: validates policy value before saving

Frontend:
- Admin settings: checkbox replaced by <select> with five options
- Bar form: barOverrideRow (hidden by default); selectBarMember() shows
  it with the right label when policy is staff_override / admin_override
  (admin only) / staff_block; hidden for never and always
- clearBarSelection() resets the override checkbox and hides the row

https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
2026-05-30 14:39:43 +00:00
..
app.js Replace overdraft checkbox with 5-option policy dropdown 2026-05-30 14:39:43 +00:00
bar.html Remove product search from bar tab 2026-05-30 08:52:18 +00:00
bar.js Remove product search from bar tab 2026-05-30 08:52:18 +00:00
cashier.html Fix 1-4: staff dropdown, split pages, print size toggle, receipts 2026-05-30 06:28:54 +00:00
cashier.js Fix 1-4: staff dropdown, split pages, print size toggle, receipts 2026-05-30 06:28:54 +00:00
common.js Fix 1-4: staff dropdown, split pages, print size toggle, receipts 2026-05-30 06:28:54 +00:00
index.html Replace overdraft checkbox with 5-option policy dropdown 2026-05-30 14:39:43 +00:00
style.css Add withdrawal feature to cashier tab 2026-05-30 14:31:16 +00:00