@php $statusMeta = [ 'over' => ['label' => __('Over'), 'chip' => 'bg-rose-50 text-rose-700', 'bar' => 'bg-rose-500'], 'under' => ['label' => __('Under'), 'chip' => 'bg-emerald-50 text-emerald-700', 'bar' => 'bg-emerald-500'], 'on_track' => ['label' => __('On track'), 'chip' => 'bg-sky-50 text-sky-700', 'bar' => 'bg-sky-500'], ]; @endphp
{{ $kpi['label'] }}
{{ $kpi['value'] }}
{{ $kpi['sub'] }}| {{ __('Category') }} | {{ __('Budget') }} | {{ __('Actual') }} | {{ __('Variance') }} | {{ __('Used') }} | {{ __('Status') }} |
|---|---|---|---|---|---|
| {{ $row['category'] }} | {{ $baseCode }} {{ number_format($row['budget'], 2) }} | {{ $baseCode }} {{ number_format($row['actual'], 2) }} | {{ $row['variance'] < 0 ? '−' : '' }}{{ $baseCode }} {{ number_format(abs($row['variance']), 2) }} @if ($row['variance_pct'] !== null) {{ $row['variance_pct'] > 0 ? '+' : '' }}{{ $row['variance_pct'] }}% @endif |
@if ($row['used_pct'] !== null)
|
{{ $sm['label'] }} |
| {{ __('Total') }} | {{ $baseCode }} {{ number_format($report['total']['budget'], 2) }} | {{ $baseCode }} {{ number_format($report['total']['actual'], 2) }} | {{ $report['total']['variance'] < 0 ? '−' : '' }}{{ $baseCode }} {{ number_format(abs($report['total']['variance']), 2) }} | {{ $report['total']['used_pct'] ?? 0 }}% | {{ $tm['label'] }} |
| {{ __('Category') }} | @foreach ($monthLabels as $label){{ $label }} | @endforeach{{ __('Total') }} |
|---|---|---|
| {{ $row['category'] }} | @for ($m = 1; $m <= 12; $m++) @php $cell = $row['months'][$m]; @endphp{{ number_format($cell['actual'], 0) }} / {{ number_format($cell['budget'], 0) }} | @endfor{{ number_format($row['actual'], 0) }} |
| {{ __('Total') }} | @for ($m = 1; $m <= 12; $m++) @php $mt = $report['month_totals'][$m]; @endphp{{ number_format($mt['actual'], 0) }} / {{ number_format($mt['budget'], 0) }} | @endfor{{ number_format($report['total']['actual'], 0) }} |
{{ __('Each cell shows actual / budget for the month. Red = over budget. Amounts in :base.', ['base' => $baseCode]) }}