Insurance Collection Report

Generated: {{ isset($generatedAt) ? $generatedAt : date('Y-m-d H:i') }}

@if(isset($dateFrom) && isset($dateTo) && $dateFrom && $dateTo && $dateFrom !== $dateTo) Period: {{ $dateFrom }} to {{ $dateTo }} @elseif(isset($dateFrom) && $dateFrom) Date: {{ $dateFrom }} @endif

{{-- Summary Section --}} @if(isset($summary) && is_array($summary))

Summary

Total Claims Net Claim Received Amount Outstanding
{{ isset($summary['count']) ? $summary['count'] : 0 }} {{ isset($summary['net_claim']) ? number_format($summary['net_claim'], 2) : '0.00' }} {{ isset($summary['received']) ? number_format($summary['received'], 2) : '0.00' }} {{ isset($summary['outstanding']) ? number_format($summary['outstanding'], 2) : '0.00' }}
@endif {{-- Transaction Details Table --}} @if(isset($rows) && is_array($rows) && count($rows) > 0)

Claim Details

@php $totalExcess = 0; $totalCoPay = 0; $totalDiscount = 0; $totalNetClaim = 0; $totalReceived = 0; @endphp @foreach ($rows as $r) @php $totalExcess += (float)($r['excess'] ?? 0); $totalCoPay += (float)($r['co_payment'] ?? 0); $totalDiscount += (float)($r['discounts'] ?? 0); $totalNetClaim += (float)($r['net_claim'] ?? 0); $totalReceived += (float)($r['received_amount'] ?? 0); @endphp @endforeach
Pay Date Receipt Invoice Patient Doctor Insurer Procedures Excess Co-Pay Discount Net Claim Received
{{ $r['pay_date'] ?? '' }} {{ $r['receipt_no'] ?? '' }} {{ $r['invoice_number'] ?? '' }} {{ $r['patient_name'] ?? '' }} {{ $r['doctor'] ?? '' }} {{ $r['insurer'] ?? '' }} {{ $r['procedures'] ?? '' }} {{ number_format($r['excess'] ?? 0, 2) }} {{ number_format($r['co_payment'] ?? 0, 2) }} {{ number_format($r['discounts'] ?? 0, 2) }} {{ number_format($r['net_claim'] ?? 0, 2) }} {{ number_format($r['received_amount'] ?? 0, 2) }}
Total {{ number_format($totalExcess, 2) }} {{ number_format($totalCoPay, 2) }} {{ number_format($totalDiscount, 2) }} {{ number_format($totalNetClaim, 2) }} {{ number_format($totalReceived, 2) }}
@else

No insurance claims found for the selected period.

@endif