@php $money = fn ($minor) => config('care.billing.currency').' '.number_format($minor / 100, 2); @endphp

{{ $statuses[$bill->status] ?? $bill->status }}

{{ $bill->invoice_number }}

{{ $bill->patient->fullName() }} · {{ $bill->branch?->name }}

Print @if ($canManage && ! in_array($bill->status, [\App\Models\Bill::STATUS_PAID, \App\Models\Bill::STATUS_VOID])) Void @endif

Line items

@foreach ($bill->lineItems as $item) @endforeach
DescriptionQtyUnitTotal
{{ $item->description }} ({{ $lineTypes[$item->type] ?? $item->type }}) {{ $item->quantity }} {{ $money($item->unit_price_minor) }} {{ $money($item->total_minor) }}
Subtotal
{{ $money($bill->subtotal_minor) }}
@if ($bill->discount_minor)
Discount
-{{ $money($bill->discount_minor) }}
@endif @if ($bill->tax_minor)
Tax
{{ $money($bill->tax_minor) }}
@endif
Total
{{ $money($bill->total_minor) }}
Balance
{{ $money($bill->balance_minor) }}
@if ($canManage && ! in_array($bill->status, [\App\Models\Bill::STATUS_PAID, \App\Models\Bill::STATUS_VOID]))

Add line item

@csrf

Discount & tax

@csrf
@endif @if ($canPay && $bill->balance_minor > 0 && $bill->status !== \App\Models\Bill::STATUS_VOID) @php $balanceMajor = number_format($bill->balance_minor / 100, 2, '.', ''); $currency = config('care.billing.currency'); @endphp

Record payment

@csrf

Collect online

Card or mobile money via your connected gateway @if ($gatewayConfigured && $gatewayProvider) ({{ $gatewayLabels[$gatewayProvider] ?? ucfirst($gatewayProvider) }}) @endif — 0% Ladill fee.

@if ($gatewayConfigured)
@csrf
@else

Connect Paystack, Flutterwave, or Hubtel in Integrations to collect online payments.

@endif
@endif

Payments

@forelse ($bill->payments as $payment) @php $methodLabel = $payment->method === \App\Models\Payment::METHOD_GATEWAY ? ($gatewayLabels[$payment->gateway_provider] ?? 'Online') : ($paymentMethods[$payment->method] ?? $payment->method); $statusSuffix = $payment->status === \App\Models\Payment::STATUS_PAID ? '' : ' · '.ucfirst($payment->status); $when = $payment->isPaid() ? ($payment->paid_at?->format('d M Y') ?? $payment->created_at->format('d M Y')) : $payment->created_at->format('d M Y'); @endphp

{{ $money($payment->amount_minor) }} · {{ $methodLabel }}{{ $statusSuffix }} · {{ $when }}@if($payment->reference) · {{ $payment->reference }}@endif

@empty

No payments recorded.

@endforelse