{{--
Where the session's money came from (App\Services\CashSessionReport).
Shared by the cash close page and its print — plain tables so it reads
the same in both. $b = the report, $print = true on the print page.
--}}
@php $print = $print ?? false; @endphp
Where the payments came from — {{ \Illuminate\Support\Carbon::parse($b['date'])->format('d M, Y') }}
@if ($b['sources']->isEmpty())
No payments received yet.
@else
| Source |
Count |
@foreach ($b['methods'] as $name)
{{ $name }} |
@endforeach
Total received |
Discount given |
@foreach ($b['sources'] as $s)
| {{ $s['source'] }} |
{{ $s['count'] }} |
@foreach ($b['methods'] as $id => $name)
{{ number_format($s['methods'][$id] ?? 0, 2) }} |
@endforeach
{{ number_format($s['amount'], 2) }} |
{{ number_format($s['discount'], 2) }} |
@endforeach
| TOTAL |
{{ $b['lines']->count() }} |
@foreach ($b['methods'] as $id => $name)
{{ number_format($b['by_method'][$id] ?? 0, 2) }} |
@endforeach
{{ number_format($b['total'], 2) }} |
{{ number_format($b['total_discount'], 2) }} |
@if (!$print)
Every payment ({{ $b['lines']->count() }})
@elseEvery payment
@endif
| # |
Time |
Source |
Bill |
Patient |
Method |
Amount |
Discount |
@foreach ($b['lines'] as $i => $l)
| {{ $i + 1 }} |
{{ $l['time']?->format('h:i A') }} |
{{ $l['source'] }}{{ $l['status'] !== 'Paid' ? ' (' . $l['status'] . ')' : '' }} |
{{ $l['bill'] }} |
{{ $l['patient'] ?? '-' }} {{ $l['patient_code'] ? '(' . $l['patient_code'] . ')' : '' }} |
{{ $l['method'] }} |
{{ number_format($l['amount'], 2) }} |
{{ number_format($l['discount'], 2) }} |
@endforeach
@if (!$print)@endif
@endif
@if ($b['expenses']->isNotEmpty())
Expenses paid out
| Expense | Note | Method | Amount |
@foreach ($b['expenses'] as $e)
| {{ $e['what'] }} | {{ $e['note'] }} | {{ $e['method'] }} | {{ number_format($e['amount'], 2) }} |
@endforeach
| TOTAL | {{ number_format($b['expenses']->sum('amount'), 2) }} |
@endif
@if ($b['refunds']->isNotEmpty())
Refunds (not counted in payments)
| Source | Bill | Patient | Amount |
@foreach ($b['refunds'] as $r)
| {{ $r->source }} | {{ $r->bill }} | {{ $r->patient_name ?? '-' }} | {{ number_format($r->payment, 2) }} |
@endforeach
@endif
Unpaid bills this cashier entered this day
({{ $b['unpaid']->count() }} bill(s), $ {{ number_format($b['unpaid']->sum('balance'), 2) }} to collect)
@if ($b['unpaid']->isEmpty())
Every bill entered by this cashier this day is paid.
@else
| Type | Bills | Billed | Paid | Balance |
@foreach ($b['unpaid_summary'] as $u)
| {{ $u['label'] }} | {{ $u['count'] }} | {{ number_format($u['charge'], 2) }} |
{{ number_format($u['paid'], 2) }} | {{ number_format($u['balance'], 2) }} |
@endforeach
@if (!$print)
Unpaid bills list ({{ $b['unpaid']->count() }})
@endif
| Patient | Type | Bill | Description | Charge | Paid | Balance | Status |
@foreach ($b['unpaid'] as $u)
| {{ $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'] }} |
@endforeach
@if (!$print)
@can('payment-view')
Collect in Unpaid Bills
@endcan
@endif
@endif