@include('templates.pdf_header', [ 'organisation' => $organisation, 'asOfDate' => $asOfDate, 'title' => $period." ".$fiscal_year.' Budget vs Actual Report' ])

Budget Comparison Report ({{ ucfirst($period) }})

@foreach($report as $periodName => $periodData) @foreach($periodData['categories'] as $catName => $category) @php $firstRow = true; @endphp @foreach($category['items'] as $item) @php $variancePercentage = $item['allocated'] != 0 ? ($item['variance'] / $item['allocated']) * 100 : 0; @endphp @endforeach @endforeach @endforeach
Category Description Allocated Spent Remaining Variance
{{ $periodName }}
@if($firstRow) {{ $catName }} @php $firstRow = false; @endphp @endif {{ $item['description'] }} {{ number_format($item['allocated']) }} {{ number_format($item['spent']) }} {{ number_format($category['remaining']) }} {{ number_format($item['variance']) }} ({{ number_format($variancePercentage, 2) }}%)