@extends('layouts.app') @section('title','Inventory Report')@section('page-title','Inventory Report') @section('content') @if(auth()->user()->isAdmin())
Reset
@endif
@foreach([[$summary['total_products'],'Total Products','stat-card-1','bi-box-seam'],[number_format($summary['total_units']),'Total Units','stat-card-2','bi-stack'],['$'.number_format($summary['inventory_value'],2),'Inventory Value (USD)','stat-card-3','bi-wallet2'],[$summary['low_stock_count'].' / '.$summary['out_of_stock'].' OOS','Low Stock / Out','stat-card-4','bi-exclamation-triangle']] as [$val,$label,$cls,$icon])
{{ $val }}
{{ $label }}
@endforeach
@if($branchInventory && $branchInventory->count())
Inventory by Branch
@foreach($branchInventory as $bi)
{{ $bi['branch']->name }}{{ $bi['branch']->code }}
{{ $bi['products'] }}
SKUs
{{ number_format($bi['units']) }}
Units
${{ number_format($bi['value_usd'],0) }}
Value
{{ $bi['low_stock'] }}
Low Stock
@endforeach
@endif
Full Product Inventory
@if(auth()->user()->isAdmin())@endif @forelse($products as $p) @if(auth()->user()->isAdmin())@endif @empty @endforelse
SKUProductBranchCategoryStockReorderCost (USD)Value (USD)
{{ $p->sku }}
{{ $p->name }}
@if($p->quantity_in_stock == 0)Out of Stock @elseif($p->isLowStock())Low Stock@endif
{{ $p->branch?->code ?? '—' }}{{ $p->category?->name }} {{ number_format($p->quantity_in_stock) }} {{ $p->reorder_level }} ${{ number_format($p->cost_price_usd,4) }} ${{ number_format($p->cost_price_usd * $p->quantity_in_stock,2) }}
No products found.
TOTAL{{ number_format($summary['total_units']) }}${{ number_format($summary['inventory_value'],2) }}
@endsection