@extends('layouts.app') @section('title', 'Cash Recon') @section('content') @php $isAdmin = auth()->user()->hasAnyRole('Super Admin', 'Hospital Admin'); @endphp
Daily cash reconciliation by shift · {{ now()->format('l, d M Y · H:i') }}
⚠ A closing has already been submitted for this shift.
Submitted by {{ $existingClosing->cashier->name ?? '—' }} on {{ $existingClosing->created_at->format('d M, H:i') }}. Cash collected: KES {{ number_format($existingClosing->cash_collected, 2) }}; deposited: KES {{ number_format($existingClosing->amount_deposited, 2) }}; variance: {{ $existingClosing->variance >= 0 ? '+' : '' }}{{ number_format($existingClosing->variance, 2) }}.
Submitting again will create a second row (rare scenarios like split shifts may need this).
Cash collected and expenses are computed live from the system.
| Cash collected (system) | {{ number_format($cashCollected, 2) }} | |||||||||||||||
| − Cash expenses paid ({{ $cashExpensePayments->count() }} item{{ $cashExpensePayments->count() === 1 ? '' : 's' }}) | {{ number_format($cashExpenses, 2) }} | |||||||||||||||
|
@if($cashExpensePayments->isEmpty())
No cash expenses paid during this shift window. @else
|
||||||||||||||||
| Expected to deposit | {{ number_format($expectedToDeposit, 2) }} | |||||||||||||||
{{ $outstandingShifts->count() }} undeposited shift{{ $outstandingShifts->count() === 1 ? '' : 's' }} must be cleared first
@if($isAdminBypass) (You are an admin — you can still submit, but the cashier responsible needs to deposit these.) @else Record the deposit for these earlier shifts before submitting a new one. Click any row to jump there. @endif
{{ $missingShifts->count() }} shift(s) had cash activity but no recon was submitted. Click any row to load its window.
| Date | Shift | Expected to Deposit | |
|---|---|---|---|
| {{ $m->date->format('d M Y') }} {{ $m->date->format('D') }} | {{ $m->shift === 'day' ? '☀ Day' : '☾ Night' }} | KES {{ number_format($m->expected, 2) }} | Load → |
| Date | Shift | Cashier | Collected | Expenses | Expected | Deposited | Variance | M-Pesa Ref | Verified |
|---|---|---|---|---|---|---|---|---|---|
| {{ $c->date->format('d M') }} | {{ $c->shift }} | {{ $c->cashier->name ?? '—' }} | {{ number_format($c->cash_collected, 2) }} | {{ number_format($c->cash_expenses, 2) }} | {{ number_format($expected, 2) }} | {{ number_format($c->amount_deposited, 2) }} | {{ $c->variance >= 0 ? '+' : '' }}{{ number_format($c->variance, 2) }} | {{ $c->mpesa_deposit_code ?: $c->deposit_reference ?: '—' }} | @if($c->verified_at) @if($canVerifyDeposits) {{-- Admin view: green "Verified" badge with hover tooltip showing who verified and when. --}} Verified @else {{-- Receptionist view post-verification: small grey confirmation so they know it was reviewed, but nothing they can act on. Tooltip carries the who/when so they can answer questions if asked. --}} Verified @endif @else @if($canVerifyDeposits) {{-- Admin view: yellow clickable tick button. Confirms on submit so admin can't fat-finger an entire shift's deposits by accident. --}} @else {{-- Receptionist view pre-verification: yellow non-clickable pill so they can see it's pending but not act on it. Disappears into a small grey badge once admin verifies (see the branch above). --}} Pending @endif @endif |