@extends('layouts.admin-simple') @section('title', 'Material Details - ' . $item->item_code) @section('breadcrumb')
{{ $item->item_description }}
| Material Code: | {{ $item->item_code }} |
| Description: | {{ $item->item_description }} |
| Category: | {{ $item->category->category_name ?? 'Unknown' }} |
| Unit of Measure: | {{ $item->unit_of_measure }} |
| Total Quantity: | {{ number_format($totalQuantity, 2) }} {{ $item->unit_of_measure }} |
| Total Value: | AED {{ number_format($totalValue, 2) }} |
| FOC Estimated Value: | AED {{ number_format($estimatedFocValue, 2) }} |
| Purchase History: | {{ $pricingHistory->count() }} purchase operations |
| Storage Locations: | Warehouse: {{ $warehouseInventory->groupBy('location')->count() }} divisions | Projects: {{ $projectSummary->count() }} projects | FOC: {{ $focSummary->count() }} sources |
| Date | Operation | Supplier | Quantity | Unit Price (Original) | Unit Price (د.إ) | Total Value (د.إ) | Batch |
|---|---|---|---|---|---|---|---|
| {{ $purchase->date->format('d M, Y') }} | {{ $purchase->operation_number }} | {{ $purchase->supplier }} | {{ number_format($purchase->quantity, 2) }} | {{ $purchase->currency }} {{ number_format($purchase->original_unit_price, 2) }} | AED {{ number_format($purchase->unit_price, 2) }} | AED {{ number_format($purchase->total_price, 2) }} | {{ $purchase->batch_number ?: '-' }} |
| No purchase history found | |||||||
| Project Name | Available Quantity | Allocated Quantity | Available for Transfer | Total Value | Batches |
|---|---|---|---|---|---|
| {{ $project['project_name'] }} | {{ number_format($project['total_quantity'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($project['allocated_quantity'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($project['available_for_transfer'], 2) }} {{ $item->unit_of_measure }} | AED {{ number_format($project['total_value'], 2) }} | {{ $project['batches_count'] }} |
| Source Project | Available Quantity | Reserved Quantity | Net Available | Estimated Value | Recoverable Value | Batches |
|---|---|---|---|---|---|---|
| {{ $foc['project_name'] }} | {{ number_format($foc['total_quantity'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($foc['reserved_quantity'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($foc['net_available'], 2) }} {{ $item->unit_of_measure }} | AED {{ number_format($foc['estimated_value'], 2) }} | AED {{ number_format($foc['recoverable_value'], 2) }} | {{ $foc['batches_count'] }} |
| Division | Batch Number | Quantity | Unit Price | Total Value | Production Date | Expiry Date | Days to Expiry | Status |
|---|---|---|---|---|---|---|---|---|
| {{ $inventory['location'] }} |
{{ $inventory['batch_number'] ?: '-' }}
|
{{ number_format($inventory['quantity_available'], 2) }} {{ $item->unit_of_measure }} | AED {{ number_format($inventory['unit_price'], 2) }} | AED {{ number_format($inventory['total_value'], 2) }} | {{ $inventory['production_date'] ? $inventory['production_date']->format('d M, Y') : '-' }} | @if($inventory['expiry_date']) {{ $inventory['expiry_date']->format('d M, Y') }} @else - @endif | @if($inventory['days_until_expiry'] !== null) @if($inventory['days_until_expiry'] < 0) Expired ({{ abs($inventory['days_until_expiry']) }} days ago) @elseif($inventory['days_until_expiry'] <= 30) {{ $inventory['days_until_expiry'] }} days @else {{ $inventory['days_until_expiry'] }} days @endif @else - @endif | {{ ucfirst(str_replace('_', ' ', $inventory['status'])) }} |
| No warehouse inventory found | ||||||||
| Project Name | Available | Allocated | Transferable | Unit Price | Total Value | Status |
|---|---|---|---|---|---|---|
| {{ $inventory['location'] }} | {{ number_format($inventory['quantity_available'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($inventory['allocated_quantity'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($inventory['available_for_transfer'], 2) }} {{ $item->unit_of_measure }} | AED {{ number_format($inventory['unit_price'], 2) }} | AED {{ number_format($inventory['total_value'], 2) }} | {{ ucfirst(str_replace('_', ' ', $inventory['status'])) }} |
| Source | Condition | Available | Reserved | Net Available | Batch | Production | Expiry | Est. Value | Status |
|---|---|---|---|---|---|---|---|---|---|
|
{{ $inventory['location'] }}
@if($inventory['source_type'])
{{ ucfirst($inventory['source_type']) }} @endif |
{{ ucfirst($inventory['condition']) }}
@if($inventory['damage_severity'])
{{ $inventory['damage_severity'] }} damage @endif |
{{ number_format($inventory['quantity_available'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($inventory['quantity_reserved'], 2) }} {{ $item->unit_of_measure }} | {{ number_format($inventory['net_available'], 2) }} {{ $item->unit_of_measure }} |
{{ $inventory['batch_number'] ?: '-' }}
|
{{ $inventory['production_date'] ? $inventory['production_date']->format('d M, Y') : '-' }} |
@if($inventory['expiry_date'])
{{ $inventory['expiry_date']->format('d M, Y') }}
@if($inventory['days_until_expiry'] !== null)
@if($inventory['days_until_expiry'] < 0)
Expired @elseif($inventory['days_until_expiry'] <= 30) {{ $inventory['days_until_expiry'] }} days @endif @endif @else - @endif |
AED {{ number_format($inventory['estimated_value'], 2) }}
@if($inventory['recoverable_value'] > 0)
Rec: AED {{ number_format($inventory['recoverable_value'], 2) }} @endif |
{{ ucfirst($inventory['status']) }} |
No pricing data available
No material distribution data available