Store ledger for advanced/deferred payments. Member registry, cashier, point of sale module, and transaction history.
Find a file
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
docs deployment.md: add Part 7 explaining internet isolation and NAT protection 2026-05-30 12:15:46 +00:00
static Replace overdraft checkbox with 5-option policy dropdown 2026-05-30 14:39:43 +00:00
.gitignore Initial commit 2026-05-30 12:01:08 +07:00
LICENSE Initial commit 2026-05-30 12:01:08 +07:00
main.py Replace overdraft checkbox with 5-option policy dropdown 2026-05-30 14:39:43 +00:00
README.md Initial commit 2026-05-30 12:01:08 +07:00
requirements.txt Add store-credit web app (FastAPI + SQLite) 2026-05-30 05:21:01 +00:00
run.bat WINDOWS ONLY 2026-05-30 20:30:03 +07:00
run.sh run.sh: remove --quiet from pip so install errors are visible 2026-05-30 11:47:23 +00:00

ClubLedger

Store ledger for advanced/deferred payments. Member registry, cashier, point of sale module, and transaction history.