@extends('layouts.admin-simple') @section('title', 'Damaged Items Details - ' . ($item->item_description ?? 'Unknown Item')) @section('breadcrumb') @endsection @section('page-title')

Damaged Items Details

Item: {{ $item->item_description ?? 'Unknown Item' }} | Code: {{ $item->item_code ?? 'No Code' }} | Total Damaged: {{ $damagedItems->count() }} instances

arrow_back Back to Summary
@endsection @section('content')
inventory_2 Item Information
Item Code: {{ $item->item_code ?? 'No Code' }}
Description: {{ $item->item_description ?? 'Unknown Item' }}
Category: {{ $item->category->category_name ?? 'No Category' }}
filter_list Filters
@if($focInventory->count() > 0)
recycling FOC Inventory Records ({{ $focInventory->count() }} records, {{ number_format($totalFocAvailable, 2) }} units available)
@foreach($focInventory as $foc) @endforeach
Date Received Source Reference Source Type Supplier Quantity Condition Status Storage Location Project Created By
{{ $foc->received_at ? $foc->received_at->format('d M Y') : ($foc->created_at ? $foc->created_at->format('d M Y') : 'N/A') }} @if($foc->received_at || $foc->created_at)
{{ ($foc->received_at ?? $foc->created_at)->format('H:i') }} @endif
{{ $foc->source_reference ?? 'No reference' }} @switch($foc->source_type) @case('supplier_foc') Supplier FOC @break @case('site_return') Site Return @break @case('inventory_conversion') Inv. Conversion @break @case('project_return') Project Return @break @case('damaged_item') Damaged Item @break @default {{ ucfirst(str_replace('_', ' ', $foc->source_type)) }} @endswitch @if($foc->source_type === 'supplier_foc' && $foc->sourceIncomingOperation && $foc->sourceIncomingOperation->supplier) {{ $foc->sourceIncomingOperation->supplier->name }} @else - @endif {{ number_format($foc->quantity_available, 2) }} @if($foc->unit)
{{ $foc->unit }} @endif
{{ ucfirst($foc->condition) }} {{ ucfirst($foc->status) }} {{ $foc->storage_location ?? '-' }} @if($foc->bin_location)
Bin: {{ $foc->bin_location }} @endif
@if($foc->sourceProject) {{ $foc->sourceProject->project_name }} @elseif($foc->source_type === 'supplier_foc' && $foc->sourceIncomingOperation && $foc->sourceIncomingOperation->project) {{ $foc->sourceIncomingOperation->project->project_name }} @else - @endif @if($foc->createdBy) {{ $foc->createdBy->name }} @else - @endif
@endif
warning Damage Records for {{ $item->item_code }} ({{ $damagedItems->total() }} records)
Loading...
Loading damaged items data...
@forelse($damagedItems as $damagedItem) @empty @endforelse
Date Source Reference Quantity Condition Severity Status Total Cost Recoverable Project Responsibility Description Actions
{{ $damagedItem->created_at->format('d M Y') }}
{{ $damagedItem->created_at->format('H:i') }}
{{ $damagedItem->source_reference ?? 'No reference' }}
{{ $sourceTypes[$damagedItem->source_type] ?? $damagedItem->source_type }}
{{ number_format($damagedItem->quantity, 2) }}
{{ $damagedItem->unit }}
{{ ucfirst($damagedItem->condition) }} {{ $severities[$damagedItem->damage_severity] ?? ucfirst($damagedItem->damage_severity) }} {{ $statuses[$damagedItem->status] ?? ucfirst($damagedItem->status) }}
{{ number_format($damagedItem->total_cost, 2) }}
{{ number_format($damagedItem->recoverable_amount, 2) }}

{{ number_format(($damagedItem->recoverable_amount / max($damagedItem->total_cost, 1)) * 100, 1) }}%
{{ $damagedItem->project->project_name ?? 'No Project' }} {{ $responsibilities[$damagedItem->cost_responsibility] ?? ucfirst($damagedItem->cost_responsibility) }}
{{ Str::limit($damagedItem->damage_description ?? 'No description', 50) }}
warning
No Damage Records Found

No damage records found for this item with current filters.

@if(method_exists($damagedItems, 'links'))
{{ $damagedItems->links() }}
@endif @endsection @push('styles') @endpush @push('scripts') @endpush