@extends('layouts.admin-simple') @section('title', 'Stock Details - ' . $project->project_name) @section('breadcrumb') @endsection @section('page-title')

{{ $project->project_name }} - Stock Details

Project: {{ $project->project_number ?: 'N/A' }} | Status: {{ ucfirst(str_replace('_', ' ', $project->status)) }}

arrow_back Back to Report
@endsection @section('content')
inventory_2
{{ $totalItems }}
Total Items
inventory
{{ number_format($totalStock) }}
Total Quantity
attach_money
{{ number_format($totalValue, 2) }}
Total Value (AED)
date_range
{{ $project->created_at->format('M Y') }}
Project Created
filter_list Filter Items
clear Clear Filters
inventory Stock Details - {{ $project->project_name }} @if($items->count() > 0) {{ $items->count() }} Items @endif
@if($items->count() > 0)
@foreach($items as $item) @php $currentStock = $item->project_stock ?? 0; $totalValue = $currentStock * ($item->effective_unit_price ?? $item->unit_cost); $isLowStock = $currentStock <= $item->min_stock_level; $isOutOfStock = $currentStock == 0; @endphp @endforeach
Item Code Category Unit Current Stock Total Delivered Min Stock Level Unit Cost (AED) Total Value (AED) Actions
inventory_2
{{ $item->item_description }}
{{ $item->item_code }}
{{ $item->item_code }} {{ $item->category->category_name ?? 'N/A' }} {{ $item->unit_of_measure }} {{ number_format($currentStock) }} {{ number_format($item->total_delivered ?? 0) }} {{ number_format($item->min_stock_level) }} {{ number_format($item->effective_unit_price ?? $item->unit_cost, 2) }} {{ number_format($totalValue, 2) }} visibility
Total {{ number_format($totalStock) }} {{ number_format($items->sum('total_delivered')) }} {{ number_format($totalValue, 2) }}
@else
inventory
No Items Found

No items match your current filter criteria for this project.
Try adjusting your filters or check if items have been assigned to this project.

@endif
@if($items->count() > 0)
analytics Stock Status Summary
@php $inStockCount = $items->filter(function($item) { $stock = $item->project_stock ?? 0; return $stock > $item->min_stock_level; })->count(); $lowStockCount = $items->filter(function($item) { $stock = $item->project_stock ?? 0; return $stock > 0 && $stock <= $item->min_stock_level; })->count(); $outOfStockCount = $items->filter(function($item) { return ($item->project_stock ?? 0) == 0; })->count(); @endphp
{{ $inStockCount }}
Items in Stock
Above minimum stock level
{{ $lowStockCount }}
Low Stock Items
At or below minimum stock level
{{ $outOfStockCount }}
Out of Stock Items
No stock available
@endif
@endsection @push('scripts') @endpush