Spec — Cashier, Shift, Device & Cash Reconciliation
1. Cashier Account Management
Shop Manager can create a Cashier with the following fields:
| Field | Required | Notes |
|---|---|---|
| Full name | ✅ | |
| Username | ✅ | |
| ✅ | ||
| Phone number | ✅ | |
| Shop | ✅ | Each Cashier belongs to only one Shop |
| Account status | ✅ | Active / Suspended / Terminated |
| Login method | ✅ | Email, username, or phone |
| Note | Optional |
Cashier uses the Shop Portal with permissions limited by role.
1.1 Account status
| Status | Description |
|---|---|
| Active | Can log in and work normally |
| Suspended | Cannot log in; active shift is handled |
| Terminated | Permanently disabled |
1.2 Suspend Cashier
When a Cashier is suspended:
- All current sessions are revoked.
- Cashier cannot log in on any device.
- Device can still be used by another Cashier.
- If Cashier has an active shift → shift moves to Suspended – Pending Reconciliation.
- Shop Manager receives a notification.
- Shop Manager counts the cash drawer and performs closing reconciliation.
- System records suspend time, actor, and last transaction.
2. Shift Management
Shop must create a shift first before Cashier can start work.
2.1 Shift information
Required when creating:
| Field | Description |
|---|---|
| Shift date | Work date |
| Scheduled start time | Planned start time |
| Scheduled end time | Planned end time |
| Assigned Cashier | Assigned Cashier |
| Assigned active device | Assigned device |
| Late grace minutes | Allowed late period |
| Note | Optional |
System auto-records:
shiftId, shopId, createdBy, createdAt, assignedBy, actualStartAt, actualEndAt, openingCash, expectedClosingCash, actualClosingCash, discrepancy, closedBy, reviewedBy, status
2.2 Scheduled Time vs Actual Time
System must store separately:
- Scheduled Start/End Time — planned time configured by Shop.
- Actual Start/End Time — time Cashier actually starts and ends.
Must not overwrite scheduled time with actual time.
2.3 Shift Assignment Validation
Cashier overlap — INVALID:
Shift 1: 08:00–16:00 } Same Cashier → BLOCK
Shift 2: 15:00–23:00 }
Device overlap — INVALID:
Cashier A: 08:00–16:00, POS-01 }
Cashier B: 15:00–23:00, POS-01 } → BLOCK
Device reuse — VALID:
Cashier A: 08:00–16:00, POS-01
Cashier B: 16:00–00:00, POS-01
2.4 Shift Status
| Phase | Status |
|---|---|
| Before start | Draft, Scheduled, Cancelled, No-Show |
| During shift | Active, Suspended, Auto-Locked |
| After end | Pending Reconciliation, Pending Manager Review, Completed, Completed with Discrepancy |
Normal flow:
Scheduled → Active → Pending Reconciliation → Completed
3. Start Shift
Cashier can only start a shift when:
- Cashier is Active.
- Shift is assigned to the correct Cashier.
- Shift is not Cancelled or No-Show.
- Cashier logs in on the correct assigned device.
- Device status is Active.
- Cashier has no other active shift.
- Previous shift is closed or Manager allows continuation.
When starting a shift:
- Cashier opens the assigned shift.
- System verifies Cashier and Device.
- Cashier enters opening cash by denomination.
- System auto-calculates total opening cash.
- Cashier submits → system records
actualStartAt→ shift becomes Active.
4. Opening Cash & Denomination Count
Shop accepts US bills and coins.
Bills
$1 · $2 · $5 · $10 · $20 · $50 · $100
Coins
$0.01 · $0.05 · $0.10 · $0.25 · $0.50 · $1.00
Total Amount = Denomination × Quantity
All cash amounts support two decimal places.
5. Cash Transactions
5.1 Cash Deposit
Player gives cash to buy Credit:
- Cashier finds Player.
- Cashier enters cash amount received.
- System checks transaction limit.
- Cashier confirms → Credit added to Player → Cash In increases.
Recorded: cashierId, shiftId, shopId, deviceId, playerId, transactionId, amount, createdAt
- Deposit by Cashier does not require Player OTP.
- Cashier cannot edit, cancel, or reverse after completion.
5.2 Cash Redemption
Player exchanges Credit for cash:
- Cashier finds Player, enters Credit amount to redeem.
- System calculates cash to pay.
- Checks limit and approval rule.
- If approval needed → Pending Approval → Shop Manager approve/reject.
- After approval → Cashier pays cash → Cash Out increases.
Limits may apply per transaction and per day.
5.3 Cash Drop
Cashier transfers cash from cash drawer to Shop Manager or safe:
- Cashier creates Cash Drop, enters denomination and amount.
- System creates Cash Drop ID.
- Cashier hands over cash offline.
- Recipient counts and confirms online on Shop Portal.
- Cash Drop → Confirmed → Expected Cash Drawer decreases.
| Status | Description |
|---|---|
| Draft | Newly created |
| Pending Handover | Awaiting handover |
| Pending Receiver Confirmation | Awaiting recipient confirmation |
| Confirmed | Confirmed — deducted from Expected Closing Cash |
| Rejected | Rejected |
| Cancelled | Cancelled |
| Disputed | Disputed |
Only Confirmed Cash Drops are deducted from Expected Closing Cash.
6. Expected Closing Cash
Expected Closing Cash = Opening Cash + Cash In − Cash Out − Confirmed Cash Drops ± Approved Adjustments
| Component | Description |
|---|---|
| Opening Cash | Opening shift cash |
| Cash In | Cash received from Player |
| Cash Out | Cash paid to Player |
| Cash Drops | Cash handed off from drawer (Confirmed) |
| Approved Adjustments | Adjustments approved by Shop Manager |
Cashier cannot edit Expected Closing Cash.
7. Blind Closing Count & Discrepancy
7.1 Blind Closing
- Cashier counts cash by denomination.
- Cashier enters Actual Closing Cash.
- Cashier cannot see Expected Closing Cash before submitting.
- After submit, system shows Expected, Actual, and Discrepancy.
- Cashier cannot edit Actual Closing Cash after submit.
7.2 Discrepancy
Discrepancy = Actual Closing Cash − Expected Closing Cash
| Result | Meaning |
|---|---|
| Negative | Shortage |
| Positive | Overage |
| Zero | Balanced |
If discrepancy exists → shift moves to Pending Manager Review → notify Shop Manager.
7.3 Manager Review & Resolution
Shop Manager can:
- Request recount
- Confirm Actual Closing Cash
- Record discrepancy reason
- Add note or attachment
- Create adjustment with audit log
- Close shift with discrepancy
- Suspend Cashier
- Escalate investigation
- Finalize shift
Resolution options:
No Action Required · Recount Confirmed · Data Entry Error · Missing Transaction · Missing Cash Drop Confirmation · Shortage Assigned to Cashier · Overage Recorded · Manager Adjustment Approved · Escalated for Investigation · Shift Closed with Discrepancy
After shift is finalized, financial data cannot be edited directly. Any subsequent changes must create a new adjustment transaction.
8. No-Show
If Cashier does not sign in before Scheduled Start Time + Late Grace Minutes:
- Shift → No-Show; record
noShowDetectedAt. - Notify Shop Manager (do not notify Admin).
- Release device for another shift assignment.
- Allow Shop to reassign another Cashier.
Shop Manager can: Reassign Cashier · Cancel shift · Create replacement shift · Record reason note.
No-Show shifts must not be deleted from history.
9. Automatic Lock
When Scheduled End Time is reached:
- Warn Cashier.
- During Closing Grace Period — complete in-progress transactions.
- After grace period — block new transactions.
- Shift → Auto-Locked → notify Cashier and Shop Manager.
- Shift → Pending Reconciliation.
System must not auto-fill Actual Closing Cash with Expected Closing Cash.
10. Shift Handover
Applies when the next Cashier receives the cash drawer from the previous Cashier:
- Cashier A stops transactions, performs closing count.
- Cashier B or Shop Manager counts handed-over cash.
- Cashier B confirms amount received.
- Closing Cash of Shift A → Opening Cash of Shift B.
- Shift A closes; Shift B is allowed to start.
Handover record stores:
fromShift, toShift, fromCashier, toCashier, device, cashDrawerOrCounter, denomination details, total cash amount, confirmation time, confirmed by, discrepancy (if any)
11. Device Management
One physical device can be used by multiple Cashiers across different shifts.
| Field | Description |
|---|---|
| Device ID | Device identifier |
| Device Name | Display name |
| Shop ID | Owning Shop |
| Device Type | Device type |
| Operating System | Operating system |
| Browser / App Version | Version |
| Device Fingerprint | Device fingerprint |
| Last IP | Most recent IP |
| First Registered Time | First registration |
| Last Active Time | Most recent activity |
| Status | Status |
| Approved By / Approved At | Approver / time |
11.1 Device Status
Pending Approval · Active · Temporarily Blocked · Compromised · Lost · Retired
11.2 Revoke Cashier Access
Revokes access for one Cashier on one device only. Other Cashiers can still use it; device remains Active.
11.3 Block Device
Locks the entire device. All sessions revoked. No Cashier can use it. Related active shifts must switch device or reconcile.
Block Device ≠ Suspend Cashier
12. Transaction Visibility
Cashier can view:
- Transactions they performed
- Transactions in current active shift
- Transactions from their past shifts (if Shop allows)
Cashier cannot view:
- Shop total balance
- Other Cashiers' transactions
- Full Shop transaction history
- Shop internal settlement
13. Shift Report
Shift report must include:
Shift Information
Shift ID · Cashier · Shop · Device · Cash Drawer/Counter · Scheduled Start/End · Actual Start/End · Shift Status
Transaction Summary
Total Transactions · Total Cash Deposits · Total Cash Redemptions · Total Cash In · Total Cash Out · Total Cash Drops · Approved Adjustments
Cash Reconciliation
Opening Cash · Expected Closing Cash · Actual Closing Cash · Discrepancy · Shortage/Overage
Review and Audit
Reviewed By · Resolution · Manager Note · Attachments · Finalized At · Audit History
14. Audit Requirements
System stores audit log for:
Cashier creation · Suspension/termination · Shift creation/assignment/reassignment · Device assignment/transfer · Opening cash · Cash deposit · Cash redemption · Cash drop · Closing cash · Manager review · Adjustment · Shift finalization · Device block/unblock · Cashier-device access revoke
| Field | Description |
|---|---|
| Action | Action performed |
| Actor | Actor |
| Previous value | Previous value |
| New value | New value |
| Reason | Reason |
| Timestamp | Timestamp |
| Device | Device |
| IP address | IP address |
| Related entity ID | Related entity ID |
15. Notification Requirements
Shop Manager receives notification when:
| Event | Notify |
|---|---|
| Cashier No-Show | ✅ Shop Manager |
| Cashier suspended mid-shift | ✅ Shop Manager |
| Shift Auto-Locked | ✅ Shop Manager + Cashier |
| Redemption needs approval | ✅ Shop Manager |
| Cash Drop needs confirmation | ✅ Shop Manager |
| Closing reconciliation has discrepancy | ✅ Shop Manager |
| New device needs approval | ✅ Shop Manager |
| Device blocked / compromised | ✅ Shop Manager |
| Shift handover has discrepancy | ✅ Shop Manager |
| No-Show | ❌ Do not notify Admin |
16. Actor Permissions Summary
Shop Manager
Create/edit/suspend/terminate Cashier · Create/edit shift · Assign/reassign Cashier and device · Handle no-show · Review closing reconciliation · Handle discrepancy · Close/finalize shift · Manage device · Block/unblock · Revoke cashier access · View reports
Admin
View Cashier/Shift by permission · Assign Cashier to shift (correct Shop) · Does not handle day-to-day no-show · Does not replace Shop Manager in reconciliation (except escalation)
Cashier
Log in (email/username/phone) · View assigned shift · Start shift · Opening cash · Deposit · Redemption (per limit) · Cash drop · View own shift transactions · Closing count · Submit reconciliation · Handover
Cashier cannot: View Shop/other transactions · Edit/cancel/reverse transactions · Change own schedule · Self-assign device · Edit actual closing cash after submit