Logo
@php function formatPhone($number) { $number = preg_replace('/\D+/', '', $number); // remove non-digits if (strlen($number) === 10) { return substr($number, 0, 3) . '-' . substr($number, 3, 3) . '-' . substr($number, 6); } return $number; // fallback for other lengths } @endphp @if(!empty($customer->customerFirstName) || !empty($customer->customerLastName))
{{ trim(($customer->customerFirstName ?? '') . ' ' . ($customer->customerLastName ?? '')) }}
@endif @if(!empty($customer->customerHomeMobileNum))
Home Phone: {{ formatPhone($customer->customerHomeMobileNum) }}
@endif @if(!empty($customer->customerMobileNum))
Cell Phone: {{ formatPhone($customer->customerMobileNum) }}
@endif @if(!empty($customer->customerWorkMobileNum))
Work Phone: {{ formatPhone($customer->customerWorkMobileNum) }}
@endif @if(!empty($customer->customerEmail))
Email: {{ strtolower($customer->customerEmail) }}
@endif

Date: {{ \Carbon\Carbon::now()->format('M d, Y') }}

{{ trim(($customer->customerFirstName ?? '') . ' ' . ($customer->customerLastName ?? '')) }}

@php $addressParts = []; if (!empty($customer->customerAddresLine)) { $addressParts[] = ucwords($customer->customerAddresLine); } if (!empty($customer->customerCity)) { $addressParts[] = ucwords($customer->customerCity); } if (!empty($customer->customerProvince)) { $addressParts[] = strtoupper($customer->customerProvince); } if (!empty($customer->customerPostalCode)) { $addressParts[] = strtoupper($customer->customerPostalCode); } $fullAddress = implode(', ', $addressParts); @endphp @if($fullAddress)

{{ $fullAddress }}

@endif
@if(!empty($customer->customerFirstName))
Dear {{ trim(($customer->customerFirstName ?? '')) }},
@endif
{!! $header_message ?? '' !!}
@foreach($customer->policySummaryIds ?? [] as $index => $policyNumber) @php $policies = $customer->groupedPolicies ?? []; $records = $policies[$policyNumber] ?? []; $firstPolicy = $records[0] ?? null; @endphp @if($firstPolicy)
@forelse($records as $policy) @empty @endforelse @if(!empty($firstPolicy['policyPremium'])) @endif
@if(!empty($firstPolicy['policyNumber']))

Policy Number: {{ $firstPolicy['policyNumber'] }}

@endif @if(!empty($firstPolicy['policyInsuranceCompanyId']))

Company: {{ $firstPolicy['policyInsuranceCompanyName'] }}

@endif @if(!empty($firstPolicy['policyIssueDate']))

Issue: {{ \Carbon\Carbon::parse($firstPolicy['policyIssueDate'])->format('M d, Y') }}

@endif
@if(!empty($firstPolicy['policyPayor']))

Payor Name: {{ $firstPolicy['policyPayor'] }}

@endif @if(!empty($firstPolicy['policyDrawDay']))

Draw Day: {{ $firstPolicy['policyDrawDay'] }}

@endif
Details Coverage Amount Premium
@if(!empty($policy['policyProductId'])) {{ strtoupper($policy['policyProductName']) }}

@endif @php $insuredNames = collect($policy['policyInsuredDetailsName'] ?? []) ->map(fn($i) => is_array($i) ? ($i['name'] ?? '') : $i) ->filter(fn($name) => !empty($name)) ->values(); @endphp @if(!empty($policy['policyInsuredDetailsName']))

Insured: @foreach($policy['policyInsuredDetailsName'] as $i => $insured) {{ $insured['name'] }}@if($i < count($policy['policyInsuredDetailsName']) - 1),@endif @endforeach

@endif @if(!empty($policy['policyIsLifeTimeExpiryDate']) || !empty($policy['policyExpiryDate']))

Expires: @if($policy['policyIsLifeTimeExpiryDate']) Death @else {{ \Carbon\Carbon::parse($policy['policyExpiryDate'])->format('M d, Y') }} @endif

@endif @if(!empty($policy['policyPrimaryBenificariesNew']))

Beneficiaries: @foreach($policy['policyPrimaryBenificariesNew'] as $i => $benef) {{ $benef['client_name'] ?? '' }} @if(!empty($benef['payoutPercentage']))- {{ $benef['payoutPercentage'] }}%@endif @if($i < count($policy['policyPrimaryBenificariesNew']) - 1),@endif @endforeach

@endif @if(!empty($policy['policyRemark']))

Remarks:

{!! $policy['policyRemark'] !!}
@endif
{{ number_format((float) ($policy['policyCoverageAmount'] ?? 0), 2) }} {{ number_format((float) ($policy['policyPremiumDetails'] ?? 0), 2) }}
No data available
Total Premium {{ number_format((float) ($firstPolicy['policyPremium'] ?? 0), 2) }}
@endif @endforeach
{!! $body_message_start ?? '' !!}
@if(count($customer->policyTermsArray ?? []) > 0 || count($customer->allSummaryArrayReport ?? []) > 0)
@endif
{!! $body_message_end ?? '' !!}
{!! $footer_message ?? '' !!}