@extends('layouts.app') @section('title', 'Cash Shift #' . $cashShift->id) @section('content') @php $isAdmin = auth()->user()->hasAnyRole('Super Admin', 'Hospital Admin'); $isOwner = auth()->id() === $cashShift->opened_by_user_id; $variance = $cashShift->variance(); $expected = $cashShift->expectedCash(); $collected = $cashShift->cashCollected(); @endphp
{{ $cashShift->shift_date->format('l, d M Y') }} · Opened by {{ $cashShift->openedBy->name ?? '—' }} at {{ $cashShift->opened_at->format('H:i') }} @if($cashShift->closed_at) · Closed by {{ $cashShift->closedBy->name ?? '—' }} at {{ $cashShift->closed_at->format('H:i') }} @endif
| Opening float | {{ number_format($cashShift->opening_float, 2) }} |
| + Cash collected during shift | {{ number_format($collected, 2) }} |
| Expected cash {{ $cashShift->status === 'open' ? 'now' : 'at close' }} | {{ number_format($expected, 2) }} |
| Counted at close | {{ number_format($cashShift->closing_count, 2) }} |
| Variance | {{ $variance >= 0 ? '+' : '' }}{{ number_format($variance, 2) }} |
Only {{ $cashShift->openedBy->name ?? 'the opener' }} or an admin can close this shift.
@endif{{ $cashShift->variance_notes }}
This shift was closed with a variance of KES {{ number_format($variance, 2) }} (threshold is KES 200). Approving acknowledges the variance and closes the shift permanently. This action is one-way — the receptionist cannot reopen to find missing cash.
@if($errors->any()){{ $cashShift->approvedBy->name ?? '—' }} approved this shift's variance on {{ $cashShift->approved_at->format('d M Y, H:i') }}.
@if($cashShift->approval_notes){{ $cashShift->approval_notes }}
@endifLive list — refresh to update.
@endif| Time | Patient | Invoice | Received By | Amount (KES) |
|---|---|---|---|---|
| {{ $p->created_at->format('H:i:s') }} | {{ $p->patient->full_name ?? '—' }} | {{ $p->invoice->invoice_number ?? '—' }} | {{ $p->receiver->name ?? '—' }} | {{ number_format($p->amount, 2) }} |