@extends('layouts.app') @section('title', 'Vote Book') @section('content') @php $money = fn ($v) => \App\Support\Fmt::money($v); $sel = 'h-9 w-full rounded-lg border border-input bg-transparent px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50'; $totals = [ 'amount' => $all->sum('amount'), 'committed' => $all->sum('committed'), 'spent' => $all->sum('spent'), 'available' => $all->sum(fn ($v) => $v->available()), ]; @endphp

Departmental votes, what is committed against them and what remains

Vote Book

CSV
@include('partials.flashes')
@foreach ([ ['label' => 'Allocated', 'value' => $money($totals['amount'])], ['label' => 'Committed on approved PRs', 'value' => $money($totals['committed'])], ['label' => 'Spent', 'value' => $money($totals['spent'])], ['label' => 'Available', 'value' => $money($totals['available'])], ] as $card)
{{ $card['value'] }} {{ $card['label'] }}
@endforeach
Reset
@forelse ($rows as $v) @if ($v->purchaseRequisitions->isNotEmpty()) @endif @empty @endforelse
Vote Department Period Amount Committed Spent Available Utilisation Status Actions
{{ $v->name }} {{ $v->department }} {{ $v->period }} {{ $money($v->amount) }} {{ $money($v->committed) }} {{ $money($v->spent) }} {{ $money($v->available()) }} {{ \App\Support\Fmt::plain($v->utilisationPct(), 1) }}% @include('kitchen.partials.badge', ['status' => $v->status])
@csrf
{{ $v->purchaseRequisitions->count() }} requisition(s) drawn on this vote @foreach ($v->purchaseRequisitions as $pr) @endforeach
PR Raised by Estimate Status
{{ $pr->pr_no }} {{ $pr->raised_by }} {{ $money($pr->estimate) }} @include('kitchen.partials.badge', ['status' => $pr->status])
No votes match these filters.

New vote

@csrf
@endsection