@if(isset($company['logo']) && $company['logo']) @endif

{{ $company['name'] }}

@if(isset($company['address']))

{{ $company['address'] }}

@endif
@if(isset($company['phone'])) Phone: {{ $company['phone'] }} @endif @if(isset($company['email'])) | Email: {{ $company['email'] }} @endif
@if(file_exists($company['logo'])) @php $imageData = file_get_contents($company['logo']); $ext = pathinfo($company['logo'], PATHINFO_EXTENSION); $mime = $ext === 'svg' ? 'svg+xml' : ($ext === 'jpg' ? 'jpeg' : $ext); $base64 = 'data:image/' . $mime . ';base64,' . base64_encode($imageData); @endphp Company Logo @else Company Logo @endif

ACCOUNT STATEMENT

Customer Information

@if($customer->Email) @endif
Name: {{ $customer->CustomerName }}
Account #: {{ $customer->AccountNo }}
Email: {{ $customer->Email }}
Phone: {{ $customer->TelNo }}
Address: {{ $customer->Address1 }}

Statement Details

Statement Period: {{ $startDate->format('F j, Y') }} to {{ $endDate->format('F j, Y') }}
Generated On: {{ now()->format('F j, Y \\a\\t g:i A') }}
Generated By: {{ auth()->user()->name }}

Transaction History

@foreach($statement['transactions'] as $transaction) @endforeach
Date Description Reference Debit Credit Balance
{{ \Carbon\Carbon::parse($transaction['date'])->format('M j, Y') }} {{ $transaction['description'] }} @if(isset($transaction['entity']->BillType) && $transaction['entity']->BillType)
{{ $transaction['entity']->BillType }} @endif
@if($transaction['type'] === 'bill') @php $billType = $transaction['bill_type'] ?? strtolower($transaction['entity']->BillType ?? ''); $routeName = $billType === 'rent' ? 'bills.rent.show' : 'bills.utility.show'; @endphp {{ $transaction['reference'] }} @else {{ $transaction['reference'] }} @endif {{ $transaction['debit'] > 0 ? number_format($transaction['debit'], 2) : '-' }} {{ $transaction['credit'] > 0 ? number_format($transaction['credit'], 2) : '-' }} {{ number_format($transaction['balance'], 2) }}