@if(session('success'))

{{ session('success') }}

@endif @if(session('error'))

{{ session('error') }}

@endif
@if($stock->images && count($stock->images) > 0) {{ $stock->product_name }} @else @endif
@if($stock->images && count($stock->images) > 1)
@foreach(array_slice($stock->images, 1, 4) as $image)
Product image
@endforeach
@endif

{{ $stock->product_name }}

Code: {{ $stock->product_code }}

{{ $stock->supplier->business_name }}
{{ $stock->category->name ?? 'Uncategorized' }}
₹{{ number_format($stock->price_per_unit, 2) }} per {{ $stock->unit }}
Availability: @if($stock->available_quantity > 0) In Stock @else Out of Stock @endif

{{ number_format($stock->available_quantity) }} {{ $stock->unit }} available

Minimum order: {{ number_format($stock->minimum_order_quantity) }} {{ $stock->unit }}

@if($stock->available_quantity > 0)
@csrf

Minimum: {{ number_format($stock->minimum_order_quantity, 2) }} {{ $stock->unit }}

@else @endif

Product Details

@if($stock->description)

Description:

{{ $stock->description }}

@endif @if($stock->specifications)

Specifications:

@foreach($stock->specifications as $key => $value)
{{ ucfirst(str_replace('_', ' ', $key)) }}: {{ $value }}
@endforeach
@endif @if($stock->colors_available)

Available Colors:

@foreach($stock->colors_available as $color) {{ $color }} @endforeach
@endif
Lead Time:

{{ $stock->lead_time_days ?? 'N/A' }} days

Quality Grade:

{{ $stock->quality_grade ?? 'N/A' }}

@if($relatedProducts->count() > 0)

Related Products

@foreach($relatedProducts as $product)

{{ $product->product_name }}

{{ $product->supplier->business_name }}

₹{{ number_format($product->price_per_unit, 2) }} per {{ $product->unit }}
View Details
@endforeach
@endif