{{-- header --}}
{{-- totals --}}
Cash Session #{{ $item->id }}
@if ($item->status == 'closed') Locked @else Open @endif
{{ \Illuminate\Support\Carbon::parse($item->date)->format('l, d M Y') }}
Shift {{ $item->shift_id ?: '—' }}
{{ $item->usr?->name ?? 'Unknown cashier' }}
Previous cashier: {{ $item->prev_cashier?->name ?? '—' }}
@if ($item->updated_at)
Closed {{ local_time($item->updated_at, 'd M Y, h:i A') }}
@endif
@foreach ([
['Opening', $item->total_open_balance, 'ti-wallet', 'secondary', ''],
['Payments received', $item->total_payments, 'ti-cash', 'success', count($b['lines']) . ' payment(s)'],
['Expenses', $item->total_expenses, 'ti-receipt', 'warning', count($b['expenses']) . ' expense(s)'],
['Expected in hand', $item->total_expected, 'ti-calculator', 'info', 'opening + payments − expenses'],
['Actual counted', $item->total_actual, 'ti-coins', 'primary', ''],
['Difference', $diff, $balanced ? 'ti-circle-check' : 'ti-alert-triangle', $balanced ? 'success' : 'danger', $balanced ? 'balanced' : ($diff < 0 ? 'short' : 'over')],
] as [$label, $value, $icon, $tone, $sub])
@endforeach
{{-- tabs --}}
{{ $label }}
{{ number_format((float) $value, 2) }}
@if ($sub){{ $sub }}@endif
{{-- overview: close by method + money by source --}}
@endif
{{-- every payment, searchable --}}
{{-- expenses --}}
Cash close by payment method
| Method | Opening | Payments | Expenses | Expected | Actual counted | Difference |
|---|---|---|---|---|---|---|
| {{ $row->method->name ?? '—' }} | {{ number_format($row->opening, 2) }} | {{ number_format($row->payments, 2) }} | {{ number_format($row->expenses, 2) }} | {{ number_format($row->expected, 2) }} | {{ number_format($row->actual, 2) }} | {{ number_format($row->difference, 2) }} |
| No methods recorded. | ||||||
| TOTAL | {{ number_format($item->total_open_balance, 2) }} | {{ number_format($item->total_payments, 2) }} | {{ number_format($item->total_expenses, 2) }} | {{ number_format($item->total_expected, 2) }} | {{ number_format($item->total_actual, 2) }} | {{ number_format($diff, 2) }} |
Where the payments came from
@if ($b['sources']->isEmpty())No payments received this day.
@else| Source | Count | @foreach ($b['methods'] as $name){{ $name }} | @endforeachTotal | Discount |
|---|---|---|---|---|
| {{ $s['source'] }} | {{ $s['count'] }} | @foreach ($b['methods'] as $mid => $name){{ number_format($s['methods'][$mid] ?? 0, 2) }} | @endforeach{{ number_format($s['amount'], 2) }} | {{ number_format($s['discount'], 2) }} |
| TOTAL | {{ count($b['lines']) }} | @foreach ($b['methods'] as $mid => $name){{ number_format($b['by_method'][$mid] ?? 0, 2) }} | @endforeach{{ number_format($b['total'], 2) }} | {{ number_format($b['total_discount'], 2) }} |
| # | Time | Source | Bill | Patient | Method | Amount | Discount |
|---|---|---|---|---|---|---|---|
| {{ $i + 1 }} | {{ $l['time'] ? local_time($l['time'], 'h:i A') : '' }} | {{ $l['source'] }} | {{ $l['bill'] }} | {{ $l['patient'] ?? '—' }} @if ($l['patient_code'])({{ $l['patient_code'] }})@endif | {{ $l['method'] }} | {{ number_format($l['amount'], 2) }} | {{ number_format($l['discount'], 2) }} |
| TOTAL | {{ number_format($b['total'], 2) }} | {{ number_format($b['total_discount'], 2) }} | |||||
@if ($b['expenses']->isEmpty())
@endif
{{-- refunds --}}
No expenses paid out this day.
@else| Expense | Note | Method | Amount |
|---|---|---|---|
| {{ $e['what'] }} | {{ $e['note'] }} | {{ $e['method'] }} | {{ number_format($e['amount'], 2) }} |
| TOTAL | {{ number_format($b['expenses']->sum('amount'), 2) }} | ||
@if ($b['refunds']->isEmpty())
@endif
{{-- unpaid bills of the day --}}
No refunds this day.
@elseRefunded payments are not counted in the session's payments.
| Source | Bill | Patient | Reason / note | Amount |
|---|---|---|---|---|
| {{ $r->source }} | {{ $r->bill }} | {{ $r->patient_name ?? '—' }} | {{ $r->description }} | {{ number_format($r->payment, 2) }} |
| TOTAL | {{ number_format($refundTotal, 2) }} | |||
@if ($b['unpaid']->isEmpty())
@can('payment-view')
Collect in Unpaid Bills
@endcan
@endif
Every bill entered by this cashier this day is paid.
@else
@foreach ($b['unpaid_summary'] as $u)
{{ $u['label'] }} {{ $u['count'] }} ·
$ {{ number_format($u['balance'], 2) }}
@endforeach
| Patient | Type | Bill | Description | Charge | Paid | Balance | Status |
|---|---|---|---|---|---|---|---|
| {{ $u['patient_name'] }} ({{ $u['patient_code'] }}) | {{ $u['type_label'] }} | {{ $u['ref'] }} | {{ $u['label'] }} | {{ number_format($u['charge'], 2) }} | {{ number_format($u['paid'] + $u['discount'], 2) }} | {{ number_format($u['balance'], 2) }} | {{ $u['status'] }} |