{{-- resources/views/budget/show.blade.php --}}

{{ $budgetLine->name }}

{{ $budgetLine->code }} · {{ $budgetLine->fiscal_year }}

@php $status = $budgetLine->statusLabel(); @endphp {{ ucfirst($status) }} · {{ $summary['utilisation'] }}% used
{{-- KPI row --}}
{{-- Budget bar --}}
Budget Utilisation {{ number_format($summary['allocated']) }} UGX allocated
@php $allocatedSafe = $summary['allocated'] > 0 ? $summary['allocated'] : 1; $pctInternal = min(round(($summary['internal'] / $allocatedSafe) * 100, 1), 100); $pctExternal = min(round(($summary['external'] / $allocatedSafe) * 100, 1), 100); $pctActual = min(round(($summary['actual'] / $allocatedSafe) * 100, 1), 100); @endphp
Actual spend External (LPO) Internal (Requisition) Available
{{-- Commitments table --}}

All Commitments

{{ $commitments->total() }} records
@forelse($commitments as $commit) @php $typeCls = match($commit->type) { 'internal' => 'bg-amber-100 text-amber-700', 'external' => 'bg-orange-100 text-orange-700', 'actual' => 'bg-red-100 text-red-700', default => 'bg-gray-100 text-gray-600', }; @endphp @empty @endforelse
Type Reference Procurement Amount (UGX) Expires / Created Status
{{ ucfirst($commit->type) }} {{ $commit->reference ?? '—' }} {{ $commit->procurement->title }}
{{ $commit->procurement->ref }}
{{ number_format($commit->amount) }} @if($commit->expires_at) @php $days = $commit->daysUntilExpiry(); @endphp {{ $commit->expires_at->format('d M Y') }} ({{ $days }}d) @else {{ $commit->created_at->format('d M Y') }} @endif @if($commit->is_active) Active @else Inactive @endif
No commitments recorded against this budget line.
@if($commitments->hasPages())
{{ $commitments->links() }}
@endif