@extends('layouts.app') @section('main-content')

My Inventory

Inventory List
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@role('Super Admin|Product Manager|Admin') @endrole @role('Super Admin|Product Manager|Admin') @endrole @forelse($inventories as $inventory) @role('Super Admin|Product Manager|Admin') @endrole @role('Super Admin|Admin|Product Manager') @endrole @empty @endforelse
# Product Name Location Min Level On HandPrd Cost (RM)Unit Price (RM)Total Cost (RM)Restock
{{ $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 {{ number_format($avgCost[$inventory->product_id], 2) }} @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 {{ number_format($avgCost[$inventory->product_id] * $onhand[$inventory->product_id], 2) }}{{ date('Y-m-d', strtotime($inventory->created_at)) }}
Record not found
@endsection @section('script') @endsection