@if(file_exists(public_path('images/logo.png'))) @elseif(asset('images/logo.png')) @endif
Expense Analysis Report
{{ $start_date->format('F d, Y') }} - {{ $end_date->format('F d, Y') }} @if($property)
Property: {{ $property->name }} @endif @if($category)
Category: {{ $category->name }} @endif
{{-- Summary Cards --}}
Total Expenses
UGX {{ number_format($total_expenses, 2) }}
{{ $expenses->count() }} transactions
Average Monthly
UGX {{ number_format($average_monthly, 2) }}
Per month average
vs Previous Period
{{ $percentage_change > 0 ? '+' : '' }}{{ number_format($percentage_change, 1) }}%
Previous: UGX {{ number_format($previous_period_total, 2) }}
{{-- Recurring vs One-time --}}
Expense Breakdown
Type Amount Percentage
🔄 Recurring Expenses UGX {{ number_format($recurring_expenses, 2) }} {{ $total_expenses > 0 ? number_format(($recurring_expenses / $total_expenses) * 100, 1) : 0 }}%
📅 One-Time Expenses UGX {{ number_format($one_time_expenses, 2) }} {{ $total_expenses > 0 ? number_format(($one_time_expenses / $total_expenses) * 100, 1) : 0 }}%
{{-- Expenses by Category --}} @if(count($expenses_by_category) > 0)
Expenses by Category
@foreach($expenses_by_category as $categoryName => $data)
{{ $categoryName }} UGX {{ number_format($data['amount'], 2) }} ({{ number_format($data['percentage'], 1) }}%)
@if($data['percentage'] > 15) {{ number_format($data['percentage'], 1) }}% @endif
{{ $data['count'] }} transaction(s)
@endforeach
@endif {{-- Monthly Trend --}} @if(count($monthly_trend) > 0)
Monthly Expense Trend
@php $previousAmount = null; @endphp @foreach($monthly_trend as $month => $amount) @php $change = $previousAmount ? (($amount - $previousAmount) / $previousAmount) * 100 : 0; @endphp @php $previousAmount = $amount; @endphp @endforeach
Month Amount vs Previous Month
{{ $month }} UGX {{ number_format($amount, 2) }} @if($previousAmount) {{ $change > 0 ? '+' : '' }}{{ number_format($change, 1) }}% @else — @endif
@endif {{-- Top Vendors --}} @if(count($top_vendors) > 0)
Top Vendors/Suppliers
@foreach($top_vendors as $vendor => $amount) @endforeach
Vendor Total Amount Percentage
{{ $vendor->name ?? 'N/A' }} UGX {{ number_format($amount, 2) }} {{ $total_expenses > 0 ? number_format(($amount / $total_expenses) * 100, 1) : 0 }}%
@endif {{-- Expense Highlights Alert --}} @if($percentage_change > 20)
⚠️ High Expense Alert: Expenses have increased by {{ number_format($percentage_change, 1) }}% compared to the previous period. Review your spending.
@endif