@extends('layouts.branch') @section('title', 'OPD Collection Report') @section('header', 'OPD Collection Report') @section('content')
@include('partials.branch._breadcrumbs', [ 'breadcrumbs' => [ ['name' => 'Reports', 'url' => route('branch.reports.index')], ['name' => 'OPD Collection Report', 'url' => route('branch.reports.opd-collection')] ] ])

Gross Revenue

₹{{ number_format($registrations->sum('charge_amount'), 2) }}

Before direct discounts

Total Savings

₹{{ number_format($registrations->sum('discount_amount'), 2) }}

Aggregated direct discounts

Net Liquidity

₹{{ number_format($grandTotal, 2) }}

Realized professional collection

Total Collection Records: {{ number_format($totalCount) }}

@forelse($registrations as $reg) @php $net = $reg->charge_amount - $reg->discount_amount; @endphp @empty @endforelse @if($registrations->count() > 0) @endif
Date UHID OPD No. Patient Details Consultation Fee Discount Net Collection
{{ $reg->visit_date->format('d M, y') }} {{ $reg->uhid }} {{ $reg->opd_number }}

{{ $reg->full_name }}

Dr. {{ $reg->doctor->name }} | {{ $reg->charge?->department->name ?? 'N/A' }}

{{ number_format($reg->charge_amount, 2) }} -{{ number_format($reg->discount_amount, 2) }} {{ number_format($net, 2) }}

No collection records found

Grand Total Net Collection ₹{{ number_format($grandTotal, 2) }}
@if($registrations->hasPages())
{{ $registrations->links() }}
@endif
@endsection