@extends('layouts.app') @section('title', 'Inventory Aging and Dead Stock') @section('content')

Inventory Aging and Dead Stock

Inventory is aged per product variation and branch using its last completed sale.

{{ number_format((int) ($summary->item_count ?? 0)) }}

Stocked variations

@format_currency((float) ($summary->stock_value ?? 0))

Inventory cost in this view

{{ $threshold }} days

Dead-stock threshold

Filters

{!! Form::open(['route' => 'inventory-aging.index', 'method' => 'get']) !!}
{!! Form::label('location_id', 'Branch') !!} {!! Form::select('location_id', $locations, request('location_id'), ['class' => 'form-control select2', 'placeholder' => 'All branches', 'style' => 'width:100%']) !!}
{!! Form::label('category_id', 'Category') !!} {!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control select2', 'placeholder' => 'All categories', 'style' => 'width:100%']) !!}
{!! Form::label('brand_id', 'Brand') !!} {!! Form::select('brand_id', $brands, request('brand_id'), ['class' => 'form-control select2', 'placeholder' => 'All brands', 'style' => 'width:100%']) !!}
{!! Form::label('age_band', 'Aging status') !!} {!! Form::select('age_band', [ 'all' => 'All inventory', 'fresh' => 'Fresh (0–30 days)', 'slow' => 'Slow moving', 'dead' => 'Dead stock', 'never_sold' => 'Never sold', ], request('age_band', 'all'), ['class' => 'form-control']) !!}
{!! Form::label('threshold_days', 'Dead after') !!}
{!! Form::number('threshold_days', $threshold, ['class' => 'form-control', 'min' => 31, 'max' => 3650]) !!} days
{!! Form::close() !!}

Aging details

Export CSV
@forelse($items as $item) @empty @endforelse
Product SKU Branch Quantity Unit cost Stock value Last sold Days Status
{{ $item->product_name }} @if($item->product_variation_name !== 'DUMMY' || $item->variation_name !== 'DUMMY')
{{ $item->product_variation_name }} {{ $item->variation_name }}
@endif
{{ $item->sub_sku }} {{ $item->location_name }} {{ @format_quantity($item->qty_available) }} @format_currency($item->unit_cost) @format_currency($item->stock_value) {{ $item->last_sold_at ? \Carbon\Carbon::parse($item->last_sold_at)->format('M d, Y') : 'Never' }} {{ number_format($item->age_days) }} {{ $item->age_label }}
No stocked products match the selected aging filters.
{{ $items->links() }}
@endsection