@extends('layouts.app') @section('title', 'Stock List') @section('page', 'inventory') @section('inventoryNav', 'stock-list') @php $statusVariant = fn ($s) => match ($s) { 'In stock' => 'success', 'Low stock' => 'warning', 'Out of stock' => 'danger', 'Inactive' => 'neutral', default => 'neutral', }; @endphp @section('content') @include('partials.inventory-nav') @if (session('success')) {{ session('success') }} @endif @if ($errors->any()) {{ $errors->first() }} @endif

Total SKUs

{{ $totalSkus }}

Tracked in inventory

In Stock

{{ $inStock }}

Healthy stock levels

Low Stock

{{ $lowStock }}

Need restocking

Out of Stock

{{ $outOfStock }}

Currently unavailable

Total Stock Value

{{ number_format($totalStockValue, 2) }}

Qty × avg cost

@forelse ($stockItems as $item) @php $label = $item->stockLabel(); $total = (float) $item->qty * (float) $item->average_cost; @endphp {{ $item->name }} {{ $item->code }} {{ $item->category?->name ?? '—' }} {{ $item->warehouse?->name ?? '—' }} @if ($item->unit) {{ $item->unit->short }} @else — @endif {{ $item->qty }} {{ number_format((float) $item->average_cost, 2) }} {{ number_format($total, 2) }} {{ $label }}
@empty No stock items yet. Add your first stock item. @endforelse
@endsection @push('styles') @endpush @push('scripts') @endpush