@if(!empty($organisation->logo)) @php $logoPath = 'storage/app/public/' . ltrim(str_replace('storage/', '', $organisation->logo), '/'); $absolutePath = base_path($logoPath); @endphp @if(file_exists($absolutePath)) @endif @endif

{{ $organisation->organisation_name }}

Budget vs Actual Comparison Report

Period: {{ \Carbon\Carbon::parse($start_date)->format('M j, Y') }} to {{ \Carbon\Carbon::parse($end_date)->format('M j, Y') }}

Budget: {{ $budget->name }} • As of: {{ $as_of_date }}

Currency: {{ $currency }}
Generated on: {{ now()->format('M j, Y H:i') }}
@php $itemsPerPage = 25; // Adjust based on your content size $currentItem = 0; $pageBreakNeeded = false; @endphp @foreach($data['items'] as $item) @php $currentItem++; // Check if we need a page break before this row if($currentItem % $itemsPerPage == 0) { $pageBreakNeeded = true; } @endphp @if($pageBreakNeeded)
Account Budget Amount Actual Amount Variance Variance %
@php $pageBreakNeeded = false; @endphp @endif @endforeach
Account Budget Amount Actual Amount Variance Variance %
{{ $item['account_name'] }} {{ number_format($item['budgeted_amount'], 2) }} {{ number_format($item['actual_amount'], 2) }} {{ number_format($item['variance_amount'], 2) }} {{ number_format(abs($item['variance_percent']), 2) }}%
Total {{ number_format($data['totals']['budgeted'], 2) }} {{ number_format($data['totals']['actual'], 2) }} {{ number_format($data['totals']['variance_amount'], 2) }} {{ number_format(abs($data['totals']['variance_percent']), 2) }}%