{{ $organisation->organisation_name }}

Budget Report

Period: {{ $budget->start_date }} - {{ $budget->end_date }}

@foreach($report as $categoryName => $cat) @php $categoryTotals = [ 'previous_estimate' => 0, 'previous_actual' => 0, 'current_estimate' => 0, 'agreed_amount' => 0 ]; @endphp @foreach($cat['subcategories'] as $subName => $accounts) @php $subTotals = [ 'previous_estimate' => 0, 'previous_actual' => 0, 'current_estimate' => 0, 'agreed_amount' => 0 ]; @endphp @foreach($accounts as $acc) @php $subTotals['previous_estimate'] += $acc['previous_estimate']; $subTotals['previous_actual'] += $acc['previous_actual']; $subTotals['current_estimate'] += $acc['current_estimate']; $subTotals['agreed_amount'] += $acc['agreed_amount']; @endphp @endforeach @php $categoryTotals['previous_estimate'] += $subTotals['previous_estimate']; $categoryTotals['previous_actual'] += $subTotals['previous_actual']; $categoryTotals['current_estimate'] += $subTotals['current_estimate']; $categoryTotals['agreed_amount'] += $subTotals['agreed_amount']; @endphp @endforeach @endforeach
Code Account Previous Estimate Previous Actual Current Estimate Agreed Amount
{{ $categoryName }}
{{ $subName }}
{{ $acc['code'] }} {{ $acc['account'] }} {{ number_format($acc['previous_estimate'],2) }} {{ number_format($acc['previous_actual'],2) }} {{ number_format($acc['current_estimate'],2) }} {{ number_format($acc['agreed_amount'],2) }}
Total {{ $subName }} {{ number_format($subTotals['previous_estimate'],2) }} {{ number_format($subTotals['previous_actual'],2) }} {{ number_format($subTotals['current_estimate'],2) }} {{ number_format($subTotals['agreed_amount'],2) }}
Total {{ $categoryName }} {{ number_format($categoryTotals['previous_estimate'],2) }} {{ number_format($categoryTotals['previous_actual'],2) }} {{ number_format($categoryTotals['current_estimate'],2) }} {{ number_format($categoryTotals['agreed_amount'],2) }}