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

Financial gates

Clear payment or authorization before patients enter gated service queues.

@if (! empty($canManageQueue) && ! empty($queueIntegration['enabled']))
@include('care.partials.queue-ops', [ 'queueIntegration' => $queueIntegration, 'queueCallNextRoute' => 'care.bills.call-next', 'queueCallNextParams' => [], 'branchId' => $branchId ?? null, 'variant' => 'button', ])
@endif Bills & invoices
@forelse ($obligations as $obligation)

{{ $obligation->patient?->fullName() ?? 'Patient' }}

{{ $statuses[$obligation->status] ?? ucfirst($obligation->status) }}

{{ $obligation->stage?->name ?? $obligation->stage_code }} · {{ $obligation->label ?? 'Workflow charge' }} @if ($obligation->branch) · {{ $obligation->branch->name }} @endif

Created {{ $obligation->created_at->format('d M Y H:i') }} @if ($obligation->bill) · Invoice {{ $obligation->bill->invoice_number }} @endif @if ($obligation->bill?->queue_ticket_number) · Ticket {{ $obligation->bill->queue_ticket_number }} @if ($obligation->bill->queue_ticket_status) ({{ $obligation->bill->queue_ticket_status }}) @endif @endif

{{ $money($obligation->amount_minor) }}

@if ($canClear && $obligation->status === \App\Models\FinancialObligation::STATUS_PENDING) @php $allowedPaymentModes = ! empty($obligation->stage?->payment_modes) ? array_intersect_key($paymentModes, array_flip($obligation->stage->payment_modes)) : $paymentModes; $availableClearanceMethods = collect($clearanceMethods)->filter(function ($label, $value) use ($obligation, $allowedPaymentModes) { return match ($value) { 'payment' => collect(array_keys($allowedPaymentModes))->intersect(['internal_cashier', 'digital'])->isNotEmpty(), 'bank_receipt' => array_key_exists('external_bank', $allowedPaymentModes), 'insurance' => (bool) $obligation->stage?->insurance_eligible, 'credit' => (bool) $obligation->stage?->credit_allowed, 'waiver', 'override' => (bool) $obligation->stage?->allow_override, default => false, }; }); @endphp
@csrf
@endif
@empty
No financial obligations match this filter.
@endforelse
{{ $obligations->links() }}