@php $db_settings = \App\Models\Setting::get(); $settings = []; foreach ($db_settings as $row) { $settings[$row->name] = $row->value; } @endphp
@if (isset($settings['icon']) && is_file('storage/settings/' . $settings['icon'])) @endif

{{ $settings['website_name'] ?? '' }}

{{ $settings['address'] ?? '' }}

{{ $settings['number_1'] ?? '' }}{{ $settings['number_2'] ? ', ' . $settings['number_2'] : '' }}

@if (isset($settings['icon']) && is_file('storage/settings/' . $settings['icon'])) @endif

Service Receipt

Patient No
{{ $item?->appointment?->Patient?->patient_id ?? $item->pat?->patient_id }}
Patient Name
{{ $item?->pat?->full_name }}
Date
{{ \Carbon\Carbon::parse($item->date)->format('d M, Y') }}
Queue
{{ $item->service_number }}
Invoice No
{{ $item->service_name }}
@php $counter = 1; $total = 0; @endphp @foreach ($item?->Repeater as $rw) @php $total += (float) $rw?->rate * $rw?->quantity; @endphp @endforeach
# Service Quantity Amount Sub Total
{{ $counter++ }} {{ $rw?->srv_type?->name }} {{ $rw?->quantity }} {{ number_format($rw?->rate, 2) }} {{ number_format($rw?->rate * $rw?->quantity, 2) }}
Total {{ number_format($total, 2) }}

Payment Summary

@php $firstPayment = $item?->Pmt?->first(); @endphp
Discount: {{ $firstPayment?->curr?->symbol }} {{ number_format($firstPayment?->discount, 2) }}
Promotion: {{ $firstPayment?->curr?->symbol }} {{ number_format($item?->promotion, 2) }}
@php $paidTotal = 0; @endphp @foreach($item->Pmt as $payment) @php $paidTotal += $payment->payment; @endphp @endforeach
Total Paid: {{ $firstPayment?->curr?->symbol }} {{ number_format($paidTotal, 2) }}
Thank you for choosing {{ $settings['website_name'] ?? '' }}!