@foreach ($groups as $rows) @php $first = $rows->first(); @endphp
@include('layouts.print_header', ['printTitle' => 'Payment Receipt'])
Patient: {{ $first->patient_name ?? '-' }} {{ $first->patient_code ? '(' . $first->patient_code . ')' : '' }} Date: {{ $first->created_at?->format('d M, Y h:i A') }}
Received by: {{ $first->usrid?->name }} Payment method: {{ $methods[$first->payment_method] ?? '-' }}
@foreach ($rows as $i => $p) @endforeach
# Type Bill Paid Discount
{{ $i + 1 }} {{ $p->source }} {{ $p->bill }} {{ number_format($p->payment, 2) }} {{ number_format($p->discount, 2) }}
TOTAL $ {{ number_format($rows->sum('payment'), 2) }} $ {{ number_format($rows->sum('discount'), 2) }}
Cashier
Patient
@endforeach