@extends('layouts.finance') @section('title', 'Inventory') @section('subtitle', 'Voucher stock, costs and margins') @section('content') @php $totalUnits = $products->sum(fn($p) => $p->stock); $totalValuePkr = $products->sum(fn($p) => (float) ($p->total_cost ?? ($p->stock * (float) $p->cost_price))); @endphp
@include('partials.kpi', ['label' => 'SKUs', 'value' => $products->count()]) @include('partials.kpi', ['label' => 'Total Units', 'value' => number_format($totalUnits)]) @include('partials.kpi', ['label' => 'Total Value', 'value' => 'PKR '.number_format($totalValuePkr, 2)])

Available Voucher Inventory

Expiry Priority {{ $inventorySource ?? 'examism_v3' }}
@if($inventoryError)
{{ $inventoryError }}
@endif @forelse($products as $product) @empty @endforelse
SKUNameSourceAvailable QtyAvg CostTotal CostSellCur.
{{ $product->sku }} {{ $product->name }} {{ $product->category }} {{ number_format($product->stock) }} {{ $metrics->money($product->cost_price, $product->currency) }} {{ $metrics->money($product->total_cost ?? ($product->stock * (float) $product->cost_price), $product->currency) }} {{ $metrics->money($product->selling_price, $product->currency) }} {{ $product->currency }}
No available inventory found in examism_v3.
@endsection