@extends('layouts.app') @section('title', 'Vehicles') @section('heading', 'Vehicles') @section('content') @php $bandLabels = ['fresh' => ['30 days or less', 'bg-emerald-500'], 'normal' => ['31 to 60 days', 'bg-sky-500'], 'warning' => ['Approaching alert', 'bg-amber-500'], 'critical' => ['Past alert', 'bg-red-600']]; $totalAging = max(1, array_sum($aging)); @endphp {{-- Stock age: one bar, sized by how many unsold vehicles sit in each age band. Each part filters the list. --}}

Unsold stock by time in inventory

{{ array_sum($aging) }} {{ Str::plural('vehicle', array_sum($aging)) }}

{{ $vehicles->total() }} {{ Str::plural('vehicle', $vehicles->total()) }}

@can('vehicles.create')Add vehicle@endcan
@can('vehicles.view_cost')@endcan @forelse ($vehicles as $v) @can('vehicles.view_cost')@endcan @empty @endforelse
Vehicles
Select for labels Stock ID Vehicle Status In inventory Mileage Asking priceLanded cost
{{ $v->stock_id }} {{ $v->display_name }} {{ $v->vin }} · {{ $v->color }} · {{ config('inventory.transmissions')[$v->transmission] ?? $v->transmission }} · {{ config('inventory.fuel_types')[$v->fuel_type] ?? $v->fuel_type }} {{ number_format($v->mileage) }} {{ $v->mileage_unit }} @include('partials.kes', ['amount' => $v->selling_price])@include('partials.kes', ['amount' => $v->landed_cost])
No vehicles match. @can('vehicles.create')Add the first one.@endcan
{{ $vehicles->links() }}
@endsection