@extends('layouts.app') @section('main-content')
# | Product Name | Location | Min Level | On Hand | @role('Super Admin|Product Manager|Admin')Prd Cost (RM) | @endroleUnit Price (RM) | @role('Super Admin|Product Manager|Admin')Total Cost (RM) | @endroleRestock | @forelse($inventories as $inventory)
---|---|---|---|---|---|---|---|---|
{{ $loop->iteration }} | {{ $inventory->products->name }} | {{ !empty($inventory->location_id) ? $inventory->storages->name : '' }} | {{ $inventory->products->threshold }} | @if ($onhand[$inventory->product_id] > $inventory->products->threshold ) {{ $onhand[$inventory->product_id] }} @elseif ($onhand[$inventory->product_id] == $inventory->products->threshold) {{ $onhand[$inventory->product_id] }} @else {{ $onhand[$inventory->product_id] }} @endif | @role('Super Admin|Product Manager|Admin'){{ number_format($avgCost[$inventory->product_id], 2) }} | @endrole@if ($avgCost[$inventory->product_id] >= $inventory->products->unit_price ) {{ number_format($inventory->products->unit_price, 2) }} @else {{ number_format($inventory->products->unit_price, 2) }} @endif | @role('Super Admin|Admin|Product Manager'){{ number_format($avgCost[$inventory->product_id] * $onhand[$inventory->product_id], 2) }} | @endrole{{ date('Y-m-d', strtotime($inventory->created_at)) }} |
Record not found |