@extends('layouts.dashboard.superadminapp') @section('title', 'Inventory Report') @section('styles') @endsection @section('content')

UEPL | Inventory Report

day, 00 month 0000
@if(session('success')) @endif @if(session('error')) @endif
Filter Options
@csrf
Reset
@php $totalItems = count($inventory); $totalPurchased = collect($inventory)->sum('purchased'); $totalSold = collect($inventory)->sum('sold'); $totalBalance = collect($inventory)->sum('balance'); $lowStockItems = collect($inventory)->filter(fn($item) => $item['balance'] < 10)->count(); $negativeStockItems = collect($inventory)->filter(fn($item) => $item['balance'] < 0)->count(); @endphp
{{ $totalItems }}
Total Items
{{ number_format($totalPurchased) }}
Total Purchased
{{ number_format($totalSold) }}
Total Sold
{{ number_format($totalBalance) }}
Total Balance
{{ $lowStockItems }}
Low Stock
{{ $negativeStockItems }}
Negative Stock
Inventory Summary
@forelse($inventory as $index => $row) @empty @endforelse @if(count($inventory) > 0) @endif
# Material Code / Item Description Purchased (Inward) Sold (Outward) Balance Status
{{ $index + 1 }} {{ $row['material_code'] }} {{ $row['description'] ?? '-' }} {{ number_format($row['purchased']) }} {{ number_format($row['sold']) }} {{ number_format($row['balance']) }} @if($row['balance'] < 0) Negative @elseif($row['balance'] < 10) Low Stock @elseif($row['balance'] > 100) In Stock @else Normal @endif
No inventory records found. Please select filters and try again.
TOTALS: {{ number_format($totalPurchased) }} {{ number_format($totalSold) }} {{ number_format($totalBalance) }} -
Low Stock Items (< 10)
@php $lowStockList = collect($inventory)->filter(fn($item) => $item['balance'] < 10 && $item['balance'] >= 0)->take(5); @endphp @forelse($lowStockList as $item) @empty @endforelse
Item Description Balance
{{ $item['material_code'] }} {{ Str::limit($item['description'], 30) }} {{ $item['balance'] }}
No low stock items
Top Stock Items
@php $topStockList = collect($inventory)->sortByDesc('balance')->take(5); @endphp @forelse($topStockList as $item) @empty @endforelse
Item Description Balance
{{ $item['material_code'] }} {{ Str::limit($item['description'], 30) }} {{ number_format($item['balance']) }}
No items found
@endsection @section('scripts') @endsection