@extends('layouts.app') @section('title', 'Event Budget Detail - ' . $eventBudget->name) @section('content')
Budget: {{ $eventBudget->name }}
Financial Health Audit

LKR {{ number_format($eventBudget->total_budget, 2) }}

Total Allocated Ceiling

LKR {{ number_format($eventBudget->allocated_amount, 2) }}
LKR {{ number_format($eventBudget->total_budget - $eventBudget->allocated_amount, 2) }}
@php $utilization = $eventBudget->total_budget > 0 ? ($eventBudget->allocated_amount / $eventBudget->total_budget) * 100 : 0; $barColor = $utilization > 90 ? '#ef4444' : ($utilization > 70 ? '#f7b84b' : '#f7b84b'); @endphp
Resource Absorption {{ number_format($utilization, 1) }}%
@if($eventBudget->missing_items_value > 0)
Uncaptured Expenditures

LKR {{ number_format($eventBudget->missing_items_value, 2) }} detected outside manifest.

Audit Required
@endif
Itemized Budget Allocation

Planned materials and estimated costs for this event

@foreach($eventBudget->items as $item) @endforeach
Material / Product Planned Qty Unit Cost Total Cost
{{ $item->product->name ?? 'N/A' }}
{{ $item->product->code ?? 'N/A' }}
{{ number_format($item->quantity, 2) }} LKR {{ number_format($item->unit_cost, 2) }} LKR {{ number_format($item->total_cost, 2) }}
Estimated Subtotal LKR {{ number_format($eventBudget->items->sum('total_cost'), 2) }}
Inventory Distribution History

Delivery notes funded through this budget pool

{{ count($eventBudget->deliveryNotes ?? []) }} Lineages Found
@forelse($eventBudget->deliveryNotes ?? [] as $dn) @empty @endforelse
DN Identifier Partner Supplier Deployment DT Deployment Value Flow State
{{ $dn->delivery_note_number }}
Terminal Synced
{{ substr($dn->supplier->name ?? '?', 0, 1) }}
{{ $dn->supplier->name ?? 'N/A' }}
{{ $dn->created_at->format('d M, Y') }}
{{ $dn->created_at->format('H:i') }} TRACE
LKR {{ number_format($dn->items->sum('total_cost'), 2) }} @php $statusColors = [ 'created' => ['color' => 'secondary', 'icon' => 'fa-file-signature'], 'handed_over' => ['color' => 'primary', 'icon' => 'fa-truck-fast'], 'returned' => ['color' => 'warning', 'icon' => 'fa-rotate-left'], 'validated' => ['color' => 'success', 'icon' => 'fa-circle-check'] ]; $config = $statusColors[$dn->status] ?? ['color' => 'secondary', 'icon' => 'fa-circle-question']; @endphp {{ str_replace('_', ' ', $dn->status) }}
No Deployments Tracked

No delivery notes have been associated with this budget pool.

@endsection @push('css') @endpush