@include('templates.pdf_header', [ 'organisation' => $organisation, 'asOfDate' => $asOfDate, 'title' => $budget->name ." ". $budget->fiscalYear->name ])

Category: {{ $budget->budget_category }} | Status: {{ ucfirst($budget->status) }} | Currency: {{ $budget->currency->code }}


{{-- Budget Allocations Section --}} @foreach ($groupedAllocations as $type => $allocations) @if (count($allocations))

{{ strtoupper($type) }} Allocations

@foreach ($allocations as $allocation) {{-- Subcategory Header Row --}} {{-- Items under Subcategory --}} @forelse ($allocation->items->where('type', $type) as $item) @empty @endforelse @endforeach
Item Code Previous Estimate ({{ $budget->currency->code }}) Previous Actual ({{ $budget->currency->code }}) Next Estimate ({{ $budget->currency->code }}) Agreed Amount ({{ $budget->currency->code }}) Remarks
{{ $allocation->accountSubCategory->name ?? 'Unknown Category' }} {{$allocation->accountSubCategory->code ?? '-' }} {{ number_format($allocation->allocated_amount, 2) }}
{{ $item->chartOfAccount->name ?? 'N/A' }} {{ $item->chartOfAccount->code ?? '-' }} {{ number_format($item->previous_estimate ?? 0, 2) }} {{ number_format($item->previous_actual ?? 0, 2) }} {{ number_format($item->next_estimate ?? 0, 2) }} {{ number_format($item->agreed_amount ?? $item->amount ?? 0, 2) }} {{ $item->remarks ?? '-' }}
No allocation items found under this category.
@endif @endforeach
{{-- Approval Trail Section --}}

Approval Trail

@forelse ($approvers as $a) @empty @endforelse
Approval Level Approver Status Date Comments
{{ $a['level'] }} {{ trim(($a['approver']->first_name ?? '') . ' ' . ($a['approver']->last_name ?? '') . ' ' . ($a['approver']->other_name ?? '')) }} {{ ucfirst($a['status']) }} {{ $a['approved_at'] ?? '-' }} {{ $a['comments'] ?? '-' }}
No approvals recorded yet.