Statement of Account
@php $base64Image = base64_encode(file_get_contents(public_path('assets/images/tyres_logo.png'))); @endphp Logo Tyres Planet PTY LTD

209 Mcroyle St, Wacol 4076
CALL: 07 3144 3131
CALL: 0488 413 131
E-mail: cst@tyresplanet.com.au

Customer Details:
Name: {{ $user->name ?? $user->first_name . ' ' . $user->last_name }}
Email: {{ $user->email }}
Phone: {{ $user->phone ?? 'N/A' }}
Address: {{ $user->address ?? '-' }}
Statement Period:
For the month of {{ now()->format('M Y') }}
Reference Date: {{ $generated_date ?? now()->format('d-m-Y') }}
Account: {{ strtoupper(substr($user->name ?? 'CUSTOMER', 0, 8)) }}

{{-- Amount Now Due:
${{ number_format($totalInvoiced - $totalPaid, 2) }} --}}
@php $rowCount = 0; @endphp @if(count($statementData) > 0) @foreach($statementData as $index => $item) @php $rowCount++; @endphp @endforeach @php $emptyRows = 18 - $rowCount; @endphp @for ($i = 0; $i < $emptyRows; $i++) @endfor @else @endif
Date Document Applied To Description Due Date Amount Outstanding
{{ $item['date']->format('d/m/Y') }} {{ $item['document'] }} {{ $item['applied_to'] }} {{ $item['description'] }} {{ $item['due_date']->format('d/m/Y') }} @if($item['amount'] < 0) -${{ number_format(abs($item['amount']), 2) }} @else ${{ number_format($item['amount'], 2) }} @endif @if($item['type'] == 'payment') $0.00 @else ${{ number_format($item['outstanding'], 2) }} @endif
             
No transactions found for this customer.
@php $current = 0; $over30 = 0; $over60 = 0; $over90 = 0; $today = now(); foreach($statementData as $item) { if($item['balance'] > 0) { $daysDiff = $today->diffInDays($item['due_date']); if($daysDiff <= 30) { $current += $item['balance']; } elseif($daysDiff <= 60) { $over30 += $item['balance']; } elseif($daysDiff <= 90) { $over60 += $item['balance']; } else { $over90 += $item['balance']; } } } @endphp
Aging Category Amount Due
Current ${{ number_format($totalInvoiced - $totalPaid, 2) }}
Over 30 Days ${{ number_format($over30, 2) }}
Over 60 Days ${{ number_format($over60, 2) }}
Over 90 Days ${{ number_format($over90, 2) }}
Total Outstanding ${{ number_format($totalInvoiced - $totalPaid, 2) }}
{{--
ABN: 95 633 998 624
15 Lancashire Street, Acacia Ridge QLD 4110, Australia
Tyres Planet Pty Ltd
DIRECT DEPOSIT: TYRES PLANET PTY LTD Account Details ACCT BSB: 064-168 ACCT #: 11083400
--}}
Tyres Planet Pty Ltd
ABN: 95 633 998 624
209 Mcroyle St, Wacol 4076
Tyres Planet Pty Ltd
DIRECT DEPOSIT: TYRES PLANET PTY LTD
Account Details
ACCT BSB: 064-168
ACCT #: 11083400