@extends('layouts.app') @section('title', 'Inventory') @section('content') Stock Batches
@if($inventory->isEmpty()) @else @foreach($inventory as $item) @php $onHand = (float) ($item->on_hand_qty ?? 0); $min = (float) ($item->minimum_stock_qty ?? 0); $isLow = $min > 0 && $onHand <= $min; @endphp @endforeach
Item Code Item UOM On Hand Min Stock Active Batches Nearest Expiry Actions
{{ $item->item_code }} {{ $item->name_en }} {{ $item->unit_of_measure }} {{ number_format($onHand, 2) }} @if($isLow) Low @endif {{ $item->minimum_stock_qty !== null ? number_format((float) $item->minimum_stock_qty, 2) : '—' }} {{ (int) ($item->active_batches ?? 0) }} {{ $item->nearest_expiry ? \Illuminate\Support\Carbon::parse($item->nearest_expiry)->format('Y-m-d') : '—' }} Batches Item
{{ $inventory->links() }}
@endif
@endsection