Edit: {{ $lot->lot_no }}

@php $statusClass = [ 'ACTIVE' => 'badge-success', 'RECALLED' => 'badge-warning', 'EXPIRED' => 'badge-danger', 'CONSUMED' => 'badge-info' ][$lot->status] ?? 'badge-info'; @endphp {{ $lot->status }}
@csrf @method('PUT')
Product Information
@php $primaryImage = $lot->product?->images?->where('is_primary', true)->first() ?? $lot->product?->images?->first(); @endphp
@if($primaryImage) {{ $lot->product->name }} @else
@endif
{{ $lot->product->name ?? 'N/A' }}
SKU: {{ $lot->product->sku ?? 'N/A' }}
@if($lot->product)
Purchase: ₹{{ number_format($lot->product->purchase_price, 2) }} Sale: ₹{{ number_format($lot->product->sale_price, 2) }}
@endif
Product cannot be changed after lot creation
@if($lot->product && $lot->product->has_variants && $lot->product->variations->count() > 0)
@php $currentVariationId = old('variation_id', $lot->variation_id); @endphp @foreach($lot->product->variations as $variation) @php $vName = $variation->variation_name; if (!$vName && $variation->attributeValues) { $parts = []; foreach($variation->attributeValues as $av) { $parts[] = $av->value; } $vName = implode(' / ', $parts); } if (!$vName) $vName = $variation->sku; $vColor = null; if ($variation->attributeValues && $variation->attributeValues->count() > 0) { foreach($variation->attributeValues as $av) { if ($av->color_code) { $vColor = $av->color_code; break; } } } @endphp
@if($vColor)
@elseif($variation->image_path) @endif
{{ $vName }}
{{ $variation->sku }}
@if($variation->sale_price)
₹{{ number_format($variation->sale_price, 2) }}
@endif
@endforeach
@error('variation_id')
{{ $message }}
@enderror
Click a variation to assign this lot to it, or leave unselected for no specific variation
@endif
@error('lot_no')
{{ $message }}
@enderror
{{ number_format($lot->initial_qty, 2) }}
Initial quantity cannot be changed
Lot-Specific Pricing
Override the product's default prices for this specific lot
Dates
@if($lot->expiry_date) @php $daysToExpiry = now()->diffInDays($lot->expiry_date, false); @endphp @if($daysToExpiry < 0)
⚠️ This lot has expired {{ abs($daysToExpiry) }} days ago
@elseif($daysToExpiry <= 30)
⚠️ Expires in {{ $daysToExpiry }} days
@else
{{ $daysToExpiry }} days until expiry
@endif @endif
Additional Information
Cancel