@extends('layouts.dashboard.superadminapp') @section('title', 'Stock Dashboard') @section('styles') @endsection @section('content')
@php $inStockItems = $totalItems - $lowStock - $outOfStock; $inStockPercent = $totalItems > 0 ? round(($inStockItems / $totalItems) * 100, 1) : 0; $lowStockPercent = $totalItems > 0 ? round(($lowStock / $totalItems) * 100, 1) : 0; $outOfStockPercent = $totalItems > 0 ? round(($outOfStock / $totalItems) * 100, 1) : 0; @endphp
Stock Status Overview
View Details
In Stock {{ number_format($inStockItems) }} ({{ $inStockPercent }}%)
Low Stock {{ number_format($lowStock) }} ({{ $lowStockPercent }}%)
Out of Stock {{ number_format($outOfStock) }} ({{ $outOfStockPercent }}%)
{{ $inStockPercent }}%
Stock Health Rate
Stock Movement (Last 30 Days)
Stock by Category
Quick Actions
Stock Alerts
@if($outOfStock > 0)
{{ $outOfStock }} item(s) are out of stock and need immediate reorder.
@endif @if($lowStock > 0)
{{ $lowStock }} item(s) are below minimum stock level.
@endif @if($outOfStock == 0 && $lowStock == 0)
All items are adequately stocked. No alerts.
@endif @if($inStockPercent < 50)
Stock health is at {{ $inStockPercent }}%. Consider reviewing inventory levels.
@endif
Category Distribution
View All
@php $totalStock = array_sum($distribution); @endphp @forelse($distribution as $category => $qty) @php $percentage = $totalStock > 0 ? round(($qty / $totalStock) * 100, 1) : 0; @endphp @empty @endforelse @if(count($distribution) > 0) @endif
Category Stock Qty Percentage
{{ $category ?: 'Uncategorized' }} {{ number_format($qty) }} {{ $percentage }}%
No category data available
Total {{ number_format($totalStock) }} 100%
@endsection @section('scripts') @endsection