b @extends('layouts.master') @section('title', 'Fee Collection Report') @section('styles') @endsection @section('content')
Back to Reports
Total Collected
${{ number_format($metrics['totalCollected'], 2) }}
Total Invoices
{{ $metrics['totalInvoices'] }}
Paid Invoices
{{ $metrics['paidInvoices'] ?? 0 }}
Outstanding Amount
${{ number_format($metrics['outstandingAmount'] ?? 0, 2) }}
@forelse ($invoices as $invoice) @php $collected = $invoice->receiptLines->sum('amount'); $balance = $invoice->total - $collected; $status = $balance == 0 ? 'paid' : ($collected > 0 ? 'partially_paid' : 'unpaid'); @endphp @empty @endforelse
Invoice # Client Invoice Date Total Amount Amount Collected Balance Status
{{ $invoice->invoice_number }} {{ $invoice->client->name ?? 'N/A' }} {{ $invoice->invoice_date->format('Y-m-d') }} ${{ number_format($invoice->total, 2) }} ${{ number_format($collected, 2) }} ${{ number_format($balance, 2) }} {{ ucfirst(str_replace('_',' ',$status)) }}
No fee records found.
@endsection