{{-- The charges panel on the consultation screen. Contributed through the `encounter.sidebar` slot, so it appears only when the Billing module is installed, enabled and licensed. Its data comes from EncounterChargesComposer. The clinician's job here is to say what was done, not to price it. Adding a quick charge opens — or reuses — the draft bill for this visit, so a nurse adding a dressing and a doctor adding a consultation fee land on one invoice rather than two. --}} @php /* | The status enum names a Bootstrap contextual colour, because that is what | it was written against and the invoice listing still reads it. Mapped here | rather than changed underneath everything else. */ $pill = static fn (string $tone): string => match ($tone) { 'success' => 'px-pill--green', 'warning' => 'px-pill--amber', 'danger' => 'px-pill--red', 'info' => 'px-pill--blue', 'primary' => 'px-pill--violet', default => 'px-pill--grey', }; @endphp @forelse ($encounterInvoices as $invoice)
{{ $invoice->reference ?? __('billing::messages.invoice_status.draft') }}
{{ trans_choice('billing::messages.invoices.lines_count', $invoice->items_count, ['count' => $invoice->items_count]) }}
{{ $invoice->total->toMajor() }}
{{ $invoice->status->label() }}
@empty

{{ __('billing::messages.charges.none') }}

@endforelse @if ($encounterIsOpen && $patientUlid !== null) @can('create', \App\Modules\Billing\Models\Invoice::class)
@csrf
@if ($quickCharges->isNotEmpty())
{{ __('billing::messages.items.service') }}
@endif @endcan @endif