@php $money = fn ($v) => '$ ' . number_format((float) $v, 2); $patient = $plan->patient; @endphp Plan statement #{{ $plan->id }} — {{ $patient?->name }}
@include('layouts.print_header', ['printTitle' => 'Treatment Plan Statement'])
Patient {{ $patient?->name }}
Patient ID {{ $patient?->patient_id }}
Treatment {{ $plan->treatment }}
Plan #{{ $plan->id }} · {{ $plan->status }}
Total {{ $money($s['total']) }}
Each month {{ $money($s['monthly']) }} × {{ $s['months'] }}
First month {{ $s['start'] }}
Printed {{ now()->format('d M, Y h:i A') }}
{{-- only the months something was paid for --}} @php($paidMonths = collect($s['installments'])->filter(fn ($i) => $i['paid'] + $i['discount'] > 0.004))
Months paid
@if ($paidMonths->count()) @foreach ($paidMonths as $i) @endforeach
MonthDuePaidDiscountStatus
{{ $i['no'] }} / {{ $s['months'] }}{{ $i['due'] }} {{ $money($i['paid']) }}{{ $money($i['discount']) }} {{ $i['status'] }}
Total paid{{ $money($s['paid']) }}{{ $money($s['discount']) }}
@else
No month paid yet.
@endif
Payments
@if ($payments->count()) @foreach ($payments as $p) @endforeach
DateMonthMethodReceived byDiscountAmount
{{ $p['date'] }}{{ $p['month'] }}{{ $p['method'] }}{{ $p['refunded'] ? ' — refunded' : '' }}{{ $p['by'] }} {{ $money($p['discount']) }}{{ $money($p['amount']) }}
@else
No payments yet.
@endif @if ($s['overdue']) @endif @if ($s['next'] && $plan->status === 'Active') @endif
Plan total{{ $money($s['total']) }}
Paid{{ $money($s['paid']) }}
Discount{{ $money($s['discount']) }}
Overdue now ({{ $s['overdue'] }} month(s)){{ $money($s['overdue_amount']) }}
Left to pay{{ $money($s['balance']) }}
Next month{{ $s['next']['due'] }} — {{ $money($s['next']['amount']) }}
Cashier
Patient / Guardian