@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'))
Total SKUs {{ $totalSkus }} In Stock {{ $inStock }} Low Stock {{ $lowStock }} Out of Stock {{ $outOfStock }} Total Stock Value {{ number_format($totalStockValue, 2) }}
@empty
{{ $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) }}
@endforelse
No stock items yet. Add your first stock item.