@if(file_exists(public_path('images/logo.png'))) @elseif(asset('images/logo.png')) @endif
TENANT STATEMENT OF ACCOUNT
Period: {{ $start_date->format('F d, Y') }} - {{ $end_date->format('F d, Y') }}
{{-- Tenant Information --}}
Tenant Name
{{ $tenant->full_name }}
Phone Number
{{ $tenant->phone ?? 'N/A' }}
Email
{{ $tenant->email ?? 'N/A' }}
Property
{{ $tenant->property->name ?? 'N/A' }}
@if($tenant->unit)
Unit Number
{{ $tenant->unit->unit_number ?? 'N/A' }}
@endif
Tenant ID
{{ $tenant->tenant_id ?? 'N/A' }}
{{-- Financial Summary Cards --}}
Total Charged
UGX {{ number_format($total_charged, 2) }}
For the period
Total Paid
UGX {{ number_format($total_paid, 2) }}
{{ number_format($payment_rate, 1) }}% of charges
Outstanding Balance
UGX {{ number_format(abs($balance), 2) }}
{{ $balance > 0 ? 'Amount Due' : 'Credit Balance' }}
{{-- Transaction History --}}
Transaction History
@if(count($transaction_history) > 0) @php $runningBalance = 0; @endphp @foreach($transaction_history as $transaction) @php $runningBalance = $transaction['balance']; @endphp @endforeach
Date Description Debit (Charges) Credit (Payments) Balance
{{ $transaction['date'] instanceof \Carbon\Carbon ? $transaction['date']->format('M d, Y') : \Carbon\Carbon::parse($transaction['date'])->format('M d, Y') }} {{ $transaction['description'] }} @if($transaction['debit'] > 0) UGX {{ number_format($transaction['debit'], 2) }} @else — @endif @if($transaction['credit'] > 0) UGX {{ number_format($transaction['credit'], 2) }} @else — @endif UGX {{ number_format(abs($runningBalance), 2) }} @if($runningBalance > 0) (Due) @elseif($runningBalance < 0) (Credit) @endif
Totals: UGX {{ number_format($total_charged, 2) }} UGX {{ number_format($total_paid, 2) }} {{ $balance > 0 ? 'Due: ' : 'Credit: ' }} UGX {{ number_format(abs($balance), 2) }}
@else

No transactions found for the selected period.

@endif
{{-- Lease Information --}} @if(count($leases) > 0)
Lease Information
@foreach($leases as $lease) @endforeach
Property Unit Monthly Rent Start Date End Date Status
{{ $lease->property->name ?? 'N/A' }} {{ $lease->unit->unit_number ?? 'N/A' }} UGX {{ number_format($lease->monthly_rent ?? 0, 2) }} {{ $lease->start_month ? \Carbon\Carbon::parse($lease->start_month)->format('M d, Y') : 'N/A' }} {{ $lease->end_month ? \Carbon\Carbon::parse($lease->end_month)->format('M d, Y') : 'N/A' }} {{ ucfirst($lease->status ?? 'Unknown') }}
@endif {{-- Payment Instructions --}} @if($balance > 0)
📌 Payment Instructions:
Please pay the outstanding amount of UGX {{ number_format($balance, 2) }} by the due date to avoid late fees.
Bank: [Your Bank Name] | Account Name: Property Management | Account Number: [Your Account Number]
Reference: Please use your Tenant ID ({{ $tenant->tenant_id ?? 'N/A' }}) as payment reference.
@elseif($balance < 0)
✅ Credit Balance:
You have a credit balance of UGX {{ number_format(abs($balance), 2) }}. This will be applied to your future rent payments.
@endif