{{__('Edit Opening Stock') }}

  1. Dashboard
  2. Product Stocks
  3. {{ __('Edit Opening Stock') }}
@csrf @method('PUT')
{{-- Product --}}
@error('product_id')

{{ $message }}

@enderror
{{-- Product Size --}}
@error('product_size_id')

{{ $message }}

@enderror
{{-- Unit --}}
@error('unit_id')

{{ $message }}

@enderror
{{-- Quantity --}}
@error('quantity')

{{ $message }}

@enderror
{{-- Warehouse --}}
@error('warehouse_id')

{{ $message }}

@enderror
@error('rack_id')

{{ $message }}

@enderror
{{-- Date --}}
@error('date')

{{ $message }}

@enderror
Cancel
@php // Prepare product sizes data in PHP first $productSizes = $products->mapWithKeys(function ($product) { return [ $product->id => $product->sizes->map(function ($size) { return [ 'id' => $size->id, 'p_unit_id' => $size->unit_id ?? '', 'p_unit' => $size->unit->name ?? '', 'label' => $size->ringSize->ring_size ?? '', ]; })->toArray() ]; }); // Prepare warehouses data in PHP first $warehousesData = $warehouses->mapWithKeys(function ($warehouse) { return [ $warehouse->id => $warehouse->racks->map(function ($rack) { return [ 'id' => $rack->id, 'rack_name' => $rack->name, ]; })->toArray() ]; }); // Get selected IDs for edit form $selectedSizeId = old('product_size_id', $product_stock->product_size_id ?? ''); $selectedRackId = old('warehouse_rack_id', $product_stock->warehouse_rack_id ?? ''); @endphp @push('script') @endpush