Operations & Shift Management Feature Request
Extracted from fork codewithsharma/FloCafe (branch: develop):
Overview
Full shift management lifecycle, cash drawer float tracking, drawer count reconciliation with variance calculation, shift enforcement middleware, and business date day-close reporting.
Proposed Changes
- Shift Schema & Migrations:
- Migration 69 (
shifts table, shift_id on orders and bills, indices) and Migration 70 (expected_cash_cents and variance_cents columns on shifts).
- Shift Lifecycle & Cash Reconciliation:
- Open shift modal (opening float input), Close shift modal (cash drawer count), Force close shift option.
- Shift reconciliation logic comparing system-calculated expected cash vs actual cash count to determine variance.
- Reference:
main/services/shift.ts, frontend/src/components/shifts/.
- Shift Enforcement Middleware:
- Option to require an open shift prior to performing cash transactions.
- Reference:
main/middleware/shift-enforcement.ts.
- Day Close & Business Date Accounting:
- Migration 71 (
day_closes table storing business date, closed user, and summary JSON).
- Timezone-safe local day boundary calculation (
localDayBoundsUtc) to avoid UTC vs local business day discrepancies.
- Reference:
main/services/day-close.ts.
Operations & Shift Management Feature Request
Extracted from fork
codewithsharma/FloCafe(branch:develop):Overview
Full shift management lifecycle, cash drawer float tracking, drawer count reconciliation with variance calculation, shift enforcement middleware, and business date day-close reporting.
Proposed Changes
shiftstable,shift_idonordersandbills, indices) and Migration 70 (expected_cash_centsandvariance_centscolumns onshifts).main/services/shift.ts,frontend/src/components/shifts/.main/middleware/shift-enforcement.ts.day_closestable storing business date, closed user, and summary JSON).localDayBoundsUtc) to avoid UTC vs local business day discrepancies.main/services/day-close.ts.