@extends('layouts.admin.master') @section('head') @endsection @section('title') Low Stock Report @endsection @section('body')
| # | 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 |