@extends('layouts.app') @section('title', 'Low Stock Items') @section('page-title', 'Low Stock Items') @section('content')

Low Stock Alert

Items with quantity at or below minimum order quantity

@if($lowStocks->count() > 0)
{{ $lowStocks->total() }} items need attention
@foreach($lowStocks as $stock) @endforeach
Product Supplier Current Stock Min. Order Qty Status Actions
{{ $stock->product_name }}
{{ $stock->product_code }}
{{ $stock->supplier->business_name }}
{{ $stock->supplier->contact_person }}
{{ number_format($stock->available_quantity, 2) }} {{ $stock->unit }}
@if($stock->available_quantity <= 0)
Out of Stock
@elseif($stock->available_quantity <= $stock->minimum_order_quantity * 0.5)
Critical Low
@else
Low Stock
@endif
{{ number_format($stock->minimum_order_quantity, 2) }} {{ $stock->unit }} @if($stock->available_quantity <= 0) Out of Stock @elseif($stock->available_quantity <= $stock->minimum_order_quantity * 0.5) Critical @else Low @endif
@if($lowStocks->hasPages())
{{ $lowStocks->links('pagination::simple-tailwind') }}
@endif @else

All stock levels are healthy!

No items are currently below their minimum order quantities.

View All Stock
@endif
@endsection