@extends('layouts.branch') @section('title', 'IPD Outstanding Report') @section('header', 'IPD Outstanding Report') @section('content')
@include('partials.branch._breadcrumbs', [ 'breadcrumbs' => [ ['name' => 'Reports', 'url' => route('branch.reports.index')], ['name' => 'IPD Outstanding Report', 'url' => route('branch.reports.ipd-outstanding')] ] ])

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

@forelse($results as $res) @php $reg = $res['registration']; @endphp @empty @endforelse @if($results->count() > 0) @endif
Patient UHID IPD No. Bed No. Charges Advances Balance Actions

{{ $reg->full_name }}

Adm: {{ $reg->admission_date->format('d M, y') }}

{{ $reg->uhid }} {{ $reg->ipd_number }} {{ $reg->bed?->bed_number ?? 'N/A' }} {{ number_format($res['total_charges'], 2) }} {{ number_format($res['total_advances'], 2) }} {{ number_format($res['outstanding'], 2) }}

No outstanding records found

Grand Total Outstanding ₹{{ number_format($grandTotal, 2) }}
@if($results->hasPages())
{{ $results->appends(request()->query())->links() }}
@endif
@endsection