@extends('layouts.app') @section('title', 'Fee Report') @section('actions') Export PDF @endsection @section('content')
Today
Showing {{ \Illuminate\Support\Carbon::parse($from)->format('d M Y') }} — {{ \Illuminate\Support\Carbon::parse($to)->format('d M Y') }} (first-time + repeat visit fees, each on its own date).
Total Patient Fee

{{ number_format($summary->total_fee, 2) }}

{{ $summary->count }} visit(s)
Total Received Fee

{{ number_format($summary->total_received, 2) }}

Total Remaining Fee

{{ number_format($summary->total_remaining, 2) }}

Total Discount Fee

{{ number_format($summary->total_discount, 2) }}

@forelse($rows as $r) @empty @endforelse @if($rows->count()) @endif
SerialPatientVisit DateTypePatient FeeReceivedRemainingDiscountBalanceReferenceCityArea
{{ $r->serial }} {{ $r->name }} {{ \Illuminate\Support\Carbon::parse($r->date)->format('d M Y') }} {{ $r->type }} {{ number_format($r->patient_fee, 2) }} {{ number_format($r->received_fee, 2) }} {{ number_format($r->remaining_fee, 2) }} {{ number_format($r->discount_fee, 2) }} {{ ucfirst($r->balance_type ?? '—') }} {{ $r->reference_name ?? '—' }} {{ $r->city ?? '—' }} {{ $r->area ?? '—' }}
No fee records in this range.
Total ({{ $summary->count }}){{ number_format($summary->total_fee, 2) }}{{ number_format($summary->total_received, 2) }}{{ number_format($summary->total_remaining, 2) }}{{ number_format($summary->total_discount, 2) }}
Remaining Payments Received (in range)
@forelse($payments as $pay) @empty @endforelse @if($payments->count()) @endif
Payment DatePatientAmountNotes
{{ $pay->payment_date->format('d M Y') }} {{ $pay->patient->name ?? '—' }} {{ number_format($pay->payment_amount, 2) }} {{ $pay->notes ?? '—' }}
No remaining payments received in this range.
Total Received Later{{ number_format($payments->sum('payment_amount'), 2) }}
@endsection