Skip to content

Feature: Shift lifecycle management, cash drawer reconciliation, & business day close #279

Description

@khaira777

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

  1. 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).
  2. 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/.
  3. Shift Enforcement Middleware:
    • Option to require an open shift prior to performing cash transactions.
    • Reference: main/middleware/shift-enforcement.ts.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions