{{-- Header --}}
Legacy Claims Services
5184 Caldwell Mill Road, Suite 204-230,
Birmingham, Alabama 35244
Email: claims@legacyclaimservices.com
Phone: (800) 780-1699

Invoice Report

Generated at: {{ $generated_at }}
Total invoices: {{ $invoices->count() }}

{{-- Table --}} @php $invloop = 0; $totalinvoiceAmount = 0; $totalTaxAmount = 0; $totalpaidAmount = 0; @endphp @foreach($invoices as $inv) @php $taxAmount = (!empty($inv->finaltotal) && !empty($inv->taxpercentage)) ? ($inv->finaltotal * $inv->taxpercentage) / 100 : 0; $balance = $inv->finaltotal + $taxAmount - $inv->amount_paid; $ownerName = trim($inv->business_first_name . ' ' . $inv->business_last_name); $totalinvoiceAmount += $inv->finaltotal; $totalTaxAmount += $taxAmount; $totalpaidAmount += $inv->amount_paid; $invloop++; @endphp {{-- 🔹 Force page-break every 40 rows to avoid huge single-page tables --}} @if($loop->iteration % 40 == 0)
# File# Invoice # Owner Name Office Insurance Bulk Paying? Claim # Policy # Invoice Date Total Tax Amount Paid Balance
{{ $invloop }} {{ $inv->file_no }} {{ $inv->invoiceno }} {{ $ownerName }} {{ $inv->officename }} {{ $inv->insurancecompanyname }} {{ $inv->paying_type == 'single' ? 'NO' : 'YES' }} {{ $inv->claim_number }} {{ $inv->policy_number }} {{ \Carbon\Carbon::parse($inv->gen_date)->format('m-d-Y') }} ${{ number_format($inv->finaltotal, 2) }} ${{ number_format($taxAmount, 2) }} ${{ number_format($inv->amount_paid, 2) }} ${{ number_format($balance, 2) }}
@endif @endforeach {{-- Totals --}}
# File# Invoice # Owner Name Office Insurance Bulk Paying? Claim # Policy # Invoice Date Total Tax Amount Paid Balance
Total : ${{ number_format($totalinvoiceAmount, 2) }} ${{ number_format($totalTaxAmount, 2) }} ${{ number_format($totalpaidAmount, 2) }} ${{ number_format(($totalinvoiceAmount + $totalTaxAmount) - $totalpaidAmount, 2) }}