{{-- 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
@foreach ($b['methods'] as $name) @endforeach @foreach ($b['sources'] as $s) @foreach ($b['methods'] as $id => $name) @endforeach @endforeach @foreach ($b['methods'] as $id => $name) @endforeach
Source Count{{ $name }}Total received Discount given
{{ $s['source'] }} {{ $s['count'] }}{{ number_format($s['methods'][$id] ?? 0, 2) }}{{ number_format($s['amount'], 2) }} {{ number_format($s['discount'], 2) }}
TOTAL {{ $b['lines']->count() }}{{ number_format($b['by_method'][$id] ?? 0, 2) }}{{ number_format($b['total'], 2) }} {{ number_format($b['total_discount'], 2) }}
@if (!$print)
Every payment ({{ $b['lines']->count() }})@else
Every payment
@endif
@foreach ($b['lines'] as $i => $l) @endforeach
# Time Source Bill Patient Method Amount Discount
{{ $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) }}
@if (!$print)
@endif @endif @if ($b['expenses']->isNotEmpty())
Expenses paid out
@foreach ($b['expenses'] as $e) @endforeach
ExpenseNoteMethodAmount
{{ $e['what'] }}{{ $e['note'] }}{{ $e['method'] }}{{ number_format($e['amount'], 2) }}
TOTAL{{ number_format($b['expenses']->sum('amount'), 2) }}
@endif @if ($b['refunds']->isNotEmpty())
Refunds (not counted in payments)
@foreach ($b['refunds'] as $r) @endforeach
SourceBillPatientAmount
{{ $r->source }}{{ $r->bill }}{{ $r->patient_name ?? '-' }}{{ number_format($r->payment, 2) }}
@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
@foreach ($b['unpaid_summary'] as $u) @endforeach
TypeBillsBilledPaidBalance
{{ $u['label'] }}{{ $u['count'] }}{{ number_format($u['charge'], 2) }} {{ number_format($u['paid'], 2) }}{{ number_format($u['balance'], 2) }}
@if (!$print)
Unpaid bills list ({{ $b['unpaid']->count() }})@endif
@foreach ($b['unpaid'] as $u) @endforeach
PatientTypeBillDescriptionChargePaidBalanceStatus
{{ $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'] }}
@if (!$print)
@can('payment-view') Collect in Unpaid Bills @endcan @endif @endif