@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')
filter_list Filters
clear Clear
inventory Stock Details - {{ $project->project_name }} ({{ $items->count() }} items)
Loading...
Loading stock data...
@if($items->count() > 0) @foreach($items as $item) @php // Include damaged stock (in FOC) as project is responsible $currentStock = ($item->project_stock ?? 0) ; $itemTotalValue = $currentStock * ($item->effective_unit_price ?? $item->unit_cost ?? 0); $isLowStock = $currentStock > 0 && $item->reorder_point > 0 && $currentStock <= $item->reorder_point; $isOutOfStock = $currentStock == 0; @endphp @endforeach
Item Code Category Unit Effective Stock Total Delivered Returned Qty Damaged Qty Total Stock Min Stock Unit Cost (AED) Total Value (AED) Actions
inventory_2
{{ Str::limit($item->item_description, 40) }}
{{ $item->item_code }}
{{ $item->item_code }} @if($item->category) {{ Str::limit($item->category->category_name, 15) }} @else - @endif {{ $item->unit_of_measure }} @php $netQty = ($item->total_delivered ?? 0) - ($item->total_returned ?? 0) - ($item->damaged_stock ?? 0) - ($item->total_transferred_out ?? 0); @endphp {{ number_format($netQty, 2) }} {{ number_format($item->total_delivered ?? 0, 2) }} @if(($item->total_returned ?? 0) > 0) {{ number_format($item->total_returned, 2) }} @else 0.00 @endif @if(($item->damaged_stock ?? 0) > 0) {{ number_format($item->damaged_stock, 2) }} @else 0.00 @endif @if($isOutOfStock) 0 @elseif($isLowStock) {{ number_format($currentStock, 2) }} @else {{ number_format($currentStock, 2) }} @endif {{ number_format($item->min_stock_level) }} {{ number_format($item->effective_unit_price ?? $item->unit_cost ?? 0, 2) }} {{ number_format($itemTotalValue, 2) }} visibility
Total {{ number_format($items->sum('total_delivered') - $items->sum('total_returned') - $items->sum('damaged_stock'), 2) }} {{ number_format($items->sum('total_delivered'), 2) }} {{ number_format($items->sum('total_returned'), 2) }} {{ number_format($totalStock, 2) }} AED {{ 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 $item->reorder_point > 0 ? $stock > $item->reorder_point : $stock > 0; })->count(); $lowStockCount = $items->filter(function($item) { $stock = $item->project_stock ?? 0; return $stock > 0 && $item->reorder_point > 0 && $stock <= $item->reorder_point; })->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('styles') @endpush @push('scripts') @endpush