@extends('layouts.app') @section('content')
Items {{ $item->name }}

{{ $item->name }}

@if($item->category) {{ $item->category->name }} @else Uncategorized @endif {{ $item->sku }}
Edit
@csrf @method('DELETE')
Back
@if($item->description)

{{ $item->description }}

@endif

Stock Level

{{ $item->stock_quantity }}

{{ $item->unit }}

Unit Cost

₹{{ number_format($item->cost_price, 2) }}

per {{ $item->unit }}

Selling Price

₹{{ number_format($item->selling_price, 2) }}

per {{ $item->unit }}

Total Value

₹{{ number_format($item->stock_quantity * $item->selling_price, 2) }}

Qty × Selling Price

Stock Health

{{ $item->stock_quantity <= 5 ? 'Low' : ($item->stock_quantity <= 10 ? 'Medium' : 'Good') }}

Item Details

Item Name

{{ $item->name }}

Item Code

{{ $item->sku }}

Unit

{{ $item->unit }}

Timeline

Created

{{ $item->created_at?->format('d M Y, h:i A') ?? 'N/A' }}

Last Updated

{{ $item->updated_at?->format('d M Y, h:i A') ?? 'N/A' }}

@if($item->allocations && count($item->allocations) > 0)

Allocations ({{ count($item->allocations) }})

@foreach($item->allocations as $allocation) @endforeach
Lead Qty Status Date Action
@if($allocation->lead) {{ $allocation->lead->company_name }} @else Unknown Lead @endif {{ $allocation->quantity }} @php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'allocated' => 'bg-green-100 text-green-800', 'returned' => 'bg-blue-100 text-blue-800', 'damaged' => 'bg-red-100 text-red-800' ]; $bgClass = $statusColors[$allocation->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $allocation->status }} {{ $allocation->created_at?->format('d M Y') ?? 'N/A' }} View
@endif
@endsection