@extends('layouts.admin.master') @section('head') @endsection @section('title') Low Stock Report @endsection @section('body')
{{-- Filter Bar --}}
Reset
{{-- Results --}}
Low Stock Items {{ number_format($items->total()) }} products found
@if($items->count() > 0) @foreach($items as $i => $item) @endforeach
# Product {{ $sortBy === 'product_name' ? ($sortDir === 'asc' ? '↑' : '↓') : '' }} Category Initial Stock {{ $sortBy === 'initial_stock' ? ($sortDir === 'asc' ? '↑' : '↓') : '' }} Total Sold {{ $sortBy === 'sold_quantity' ? ($sortDir === 'asc' ? '↑' : '↓') : '' }} Current Stock {{ $sortBy === 'current_stock' ? ($sortDir === 'asc' ? '↑' : '↓') : '' }} Reorder Qty Status
{{ ($items->currentPage() - 1) * $items->perPage() + $i + 1 }} {{ $item->product_name ?? 'N/A' }} {{ $item->category ?? '—' }} {{ (int)($item->initial_stock ?? 0) }} {{ (int)($item->sold_quantity ?? 0) }} {{ (int)($item->current_stock ?? 0) }} units {{ max(10, (int)($item->sold_quantity ?? 0) * 2) }} units ⚠️ LOW STOCK
Showing {{ $items->firstItem() }}–{{ $items->lastItem() }} of {{ number_format($items->total()) }} items
{{ $items->appends(request()->all())->links() }}
@else
✅ No products found matching your criteria.
@endif
@endsection