@extends('layouts.app') @section('title', 'Gov Allocations') @section('content') @php $account = request('account', 'Operations'); @endphp

Government Allocations

Record institutional capitation from the Ministry of Education (Tuition & Operations)

New Allocation

@php $visible = $voteheads->filter(fn ($v) => $account === 'Tuition' ? str_contains($v->name, 'Tuition') || str_contains($v->name, 'Uneb') : str_contains($v->name, 'Operations') || str_contains($v->name, 'Hostel'))->values(); @endphp
@csrf @foreach ($visible as $v)
{{ $v->name }}
@endforeach

Allocation History

@foreach ($allocations as $a) @php $parts = collect(json_decode($a->voteheads, true) ?: []); $total = $parts->sum('amount'); @endphp @endforeach
Year / Term Account Breakdown Total Print
{{ $a->year }} {{ $a->term }} {{ $a->account }} @foreach ($parts as $p) {{ $p['name'] }} — KES {{ number_format($p['amount']) }} @endforeach KES {{ number_format($total, 2) }} PDF
@endsection