{{-- BILLING LIST --}} {{-- Stats Row --}} @if($activeTab === 'bills')

Today's Collection

₹{{ number_format($stats['today_revenue'], 2) }}

Unpaid Bills

{{ $stats['total_unpaid'] }}

Today OP

{{ $stats['op_today'] }}

Total OP

{{ $stats['op_count'] }}

@else

Total OP

{{ $opStats['total'] }}

Bookings

Review Visits

{{ $opStats['review'] }}

Patients

Paid (Revenue)

{{ $opStats['paid'] }}

Paid

Total Amount

₹{{ number_format($opStats['revenue'], 0) }}

Gross Collections

Discounts

₹{{ number_format($opStats['discount'], 0) }}

Total Reductions

@endif {{-- Tab Switcher --}}
{{-- Filters --}} @if($activeTab === 'bills')
@else
From
To
@endif {{-- Table --}}
@if($activeTab === 'bills')
@forelse($bills as $bill) {{-- Mobile Bill Row --}}

{{ $bill->bill_number }}

{{ $bill->patient?->full_name ?? 'N/A' }}

{{ $bill->patient?->uhid ?? '—' }}

₹{{ number_format($bill->total_amount, 2) }}

Paid: ₹{{ number_format($bill->paid_amount, 2) }} · Due: ₹{{ number_format(max(0, $bill->balance_amount), 2) }}

{{ $bill->payment_method ?? '—' }}

@if($bill->payment_status === 'Paid') Paid @elseif($bill->payment_status === 'Unpaid') Unpaid @else {{ $bill->payment_status }} @endif

{{ $bill->created_at->format('d M Y') }}

@if($bill->payment_status !== 'Paid' || $bill->balance_amount > 0) @endif Print
@empty
No bills found.
@endforelse
{{ $bills->links() }}
@else {{-- OP BOOKINGS LIST --}}
@forelse($ops as $op)

TOKEN #{{ $op->token_number }}

{{ $op->patient?->full_name ?? 'N/A' }}

M/O: {{ $op->patient?->mother_name ?? '—' }} {{ $op->patient?->address ?? '—' }}

{{ $op->patient?->uhid ?? '—' }}

₹{{ number_format($op->fee, 0) }}

@if($op->discount_amount > 0)

Disc: ₹{{ number_format($op->discount_amount, 0) }}

@endif

{{ $op->payment_method ?? '—' }}

@if($op->visit_type === 'Review') {{ $op->visit_type }} @else {{ $op->visit_type }} @endif @if($op->bill) @if($op->bill->payment_status === 'Paid') Paid @else {{ $op->bill->payment_status }} @endif @else Not Billed @endif

{{ $op->consultation_date->format('d M Y') }}

@unless($op->bill) @else Billed @endunless
@empty
No OP bookings found.
@endforelse
{{ $ops->links() }}
@endif

Clinical Authorization

@if($isAuthorizedByDoctor)

✓ DOCTOR HAS AUTHORIZED STAFF TO APPLY DISCOUNT UP TO ₹{{ number_format($authorizedLimit, 2) }}.

@else

⚠ NO CLINICAL AUTHORIZATION GRANTED BY DOCTOR. ONLY DOCTORS OR ADMINS CAN PROCEED.

@endif
@php $currentBill = \App\Models\Bill::find($selectedBillId); @endphp @if($currentBill && $currentBill->items->count() > 1) @foreach($currentBill->items as $item) @endforeach @endif

Receptionist Discount

This will reduce the consultation fee and record the discount reason.