@extends('layouts.app') @section('title', 'Executive dashboard') @section('heading', 'Executive dashboard') @section('content') @php $k = fn ($v) => number_format((float) $v); $i = $s['inventory']; $max = max(1, (float) collect($s['monthly'])->max(fn ($m) => (float) $m['revenue'])); @endphp
{{ $from->format('d M Y') }} to {{ $to->format('d M Y') }} · updated {{ now()->format('H:i:s') }} (refreshes every minute)
@can('executive.export'){{ $export['excel'] ? 'Download Excel' : 'Download CSV' }}{{ $export['pdf'] ? 'Download PDF' : 'Printable report' }}
@endcanVehicles sold
{{ $s['totals']['units'] }}
today {{ $s['today']['units'] }}
Gross profit (KSh)
{{ $k($s['totals']['gp']) }}
margin {{ $s['totals']['margin'] ?? '–' }}% · today {{ $k($s['today']['gp']) }}
Inventory turn (yearly)
{{ $i['turn_annual'] ?? '–' }}×
stock lasts about {{ $i['days_to_sell_stock'] ?? '–' }} days at this pace
Stock held (KSh)
{{ $k($i['value_now']) }}
{{ $i['units_now'] }} cars · {{ $i['aged_units'] }} over 90 days
| Branch | Sold | @if ($canSeeProfit)Revenue | Gross profit | Margin | @endifIn stock | Stock value |
|---|---|---|---|---|---|---|
| {{ $r['name'] }} | {{ $r['units'] }} | @if ($canSeeProfit){{ $k($r['revenue']) }} | {{ $k($r['gp']) }} | {{ $r['margin'] !== null ? $r['margin'].'%' : '–' }} | @endif{{ $r['stock_units'] }} | {{ $k($r['stock_value']) }} |
| All branches | {{ $s['totals']['units'] }} | @if ($canSeeProfit){{ $k($s['totals']['revenue']) }} | {{ $k($s['totals']['gp']) }} | {{ $s['totals']['margin'] !== null ? $s['totals']['margin'].'%' : '–' }} | @endif{{ $i['units_now'] }} | {{ $k($i['value_now']) }} |
Turn = cost of cars sold ÷ average stock value, using each car's landed cost. A higher number means cash is not sitting in the yard.
Nothing is waiting.
@else