@extends('layouts.app') @section('title','Inventory') @section('page_title','Inventory') @section('content') @php $isCashier = auth()->user()->isCashier(); @endphp

Stock Overview

@if($canAddStock)+ Receive Stock@endif @if($canAdjustStock)Correct Stock@endif @if(in_array(auth()->user()->role,['owner','manager'],true))@endif
More
Movement History @if(in_array(auth()->user()->role,['owner','manager'],true)) @if(auth()->user()->role === 'owner')Import Stock@endif @endif
@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@unless($isCashier)@endunless
@forelse($products as $product) @php $wholesaleQty=$product->wholesaleAvailable(); $singleQty=$product->looseSingleAvailable(); $soldWholesale=max(0,(int)($product->sold_wholesale_units ?? 0)-(int)($product->returned_wholesale_units ?? 0)); $soldSingle=max(0,(int)($product->sold_single_units ?? 0)-(int)($product->returned_single_units ?? 0)); $soldSingleLabel=number_format($soldSingle).' '.$product->unitName('single',$soldSingle); $soldWholesaleLabel=number_format($soldWholesale).' '.$product->unitName('wholesale',$soldWholesale); @endphp @empty@endforelse
ProductCategoryUnit ConversionWholesale StockSingle StockSoldStatusActions
{{ $product->name }} {{ $product->category?->displayName() ?? 'General Products' }} {{ $product->conversionLabel() }} @if($product->canSellWholesale()){{ number_format($wholesaleQty) }} {{ $product->unitName('wholesale',$wholesaleQty) }}@else—@endif @if($product->canSellSingle()){{ number_format($singleQty) }} {{ $product->unitName('single',$singleQty) }}@else—@endif
{{ $soldSingleLabel }} @if($product->canSellWholesale()){{ $soldWholesaleLabel }}@endif
{{ $product->stockStatusLabel() }}
@if($canAddStock)Receive@endif @if($canAdjustStock)±@endif
No inventory records found.
@forelse($products as $product) @php $wholesaleQty=$product->wholesaleAvailable(); $singleQty=$product->looseSingleAvailable(); $soldWholesale=max(0,(int)($product->sold_wholesale_units ?? 0)-(int)($product->returned_wholesale_units ?? 0)); $soldSingle=max(0,(int)($product->sold_single_units ?? 0)-(int)($product->returned_single_units ?? 0)); @endphp
@if($product->thumbnailUrl())@else{{ strtoupper(substr($product->name,0,1)) }}@endif

{{ $product->name }}

{{ $product->category?->displayName() ?? 'General Products' }}
{{ $product->stockStatusLabel() }}
{{ $product->stockDisplay() }}
Mode{{ $product->sellingModeLabel() }}Conversion{{ $product->conversionLabel() }}
@if($canAddStock)Receive@elseif($canAdjustStock)Correct@endif @if($canAdjustStock || $canAddStock)
•••
@if($canAdjustStock)Correct Stock@endif @if($canAddStock)Receive Stock@endif
@endif
@empty
I

No inventory records

Clear the filters or add a product to begin tracking stock.

@endforelse
@endsection