Visit Billing & Checkout

Consolidate charges and process payments

@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

Visits Ready for Billing

@forelse($visits as $visit)

{{ $visit->patient->full_name }}

{{ $visit->visit_number }}

{{ $visit->status_label }}
{{ $visit->checked_in_at->format('M d, Y h:i A') }}
@if($visit->bills->count() > 0) @php $bill = $visit->bills->first(); @endphp
Bill: ₦{{ number_format($bill->total_amount, 2) }} ({{ ucfirst($bill->status) }})
@endif
@empty

No visits ready for billing.

@endforelse
{{ $visits->links() }}
@if($selectedVisit)

Bill for {{ $selectedVisit->patient->full_name }}

Visit: {{ $selectedVisit->visit_number }}

@if($selectedBill && $selectedBill->status === 'paid') Paid @endif
@if(!$selectedBill)
@if(count($billItems) > 0)

Bill Breakdown

@foreach($billItems as $item) @endforeach
Description Qty Unit Price Total
{{ $item['description'] }} {{ $item['quantity'] }} ₦{{ number_format($item['unit_price'], 2) }} ₦{{ number_format($item['total'], 2) }}
Subtotal: ₦{{ number_format($subtotal, 2) }}
Tax (5%): ₦{{ number_format($tax_amount, 2) }}
-₦{{ number_format($discount_amount, 2) }}
Total: ₦{{ number_format($total_amount, 2) }}
@if($insurance_covered)
Patient Responsibility (20%): ₦{{ number_format($patient_responsibility, 2) }}
@endif
@endif
@else

Bill #{{ $selectedBill->bill_number }}

Created: {{ $selectedBill->created_at->format('M d, Y h:i A') }}

{{ ucfirst($selectedBill->status) }}
Subtotal: ₦{{ number_format($selectedBill->subtotal, 2) }}
Tax: ₦{{ number_format($selectedBill->tax_amount, 2) }}
@if($selectedBill->discount_amount > 0)
Discount: -₦{{ number_format($selectedBill->discount_amount, 2) }}
@endif
Total Amount: ₦{{ number_format($selectedBill->total_amount, 2) }}
Balance: ₦{{ number_format($selectedBill->balance, 2) }}
@if($selectedBill->payments->count() > 0)
Payment History
@foreach($selectedBill->payments as $payment)
₦{{ number_format($payment->amount, 2) }} - {{ ucfirst($payment->payment_method) }} {{ $payment->payment_date->format('M d, Y') }}
@endforeach
@endif @if($selectedBill->balance > 0) @else @endif
@endif
@else

Select a visit

Choose a visit from the list to view and process billing.

@endif
@if($showPaymentModal && $selectedBill) @endif