@extends('index') @section('content') Edit Product Back @csrf Category Select Category @if($category->count()) @foreach($category as $item) category_id ? 'selected' : '' }}>{{$item->name}} @endforeach @endif Good job! Select Category Unit Select Unit @if($unit->count()) @foreach($unit as $item) head_id ? 'selected' : '' }}>{{$item->name}} @endforeach @endif Good job! Select Unit Product Status Active Inactive Good job! Article No Good job! Enter Article No HS Code Good job! Enter HS Code Product Name Good job! Enter Product Name Sizes Select Sizes @if($size->count()) @foreach($size as $item) pluck('head_id')->contains($item->head_id) ? 'selected' : '' }}>{{ $item->name }} @endforeach @endif Good job! Select Size Product Images Choose Images Good job! Product Stages Select Stages {{-- First display selected stages in their original order --}} @if($pstage->count()) @foreach($pstage as $selectedStage) {{$selectedStage->name}} @endforeach @endif {{-- Then display remaining unselected stages --}} @if($stage->count()) @foreach($stage as $item) @unless($item->material_type_id == '61' || $item->material_type_id == '96') @unless($pstage->pluck('head_id')->contains($item->head_id)) {{$item->name}} @endunless @endunless @endforeach @endif Product Materials Select Material @if($material->count()) @foreach($material as $item) pluck('material_id')->contains($item->material_id) ? 'selected' : '' }}>{{$item->material_no}} - {{$item->name}} @endforeach @endif Product Components (Other Products Used in Manufacturing) @if(isset($existingProductComponents) && count($existingProductComponents) > 0) @foreach($existingProductComponents as $component) Remove @endforeach @else Add other finished products that are used as components in manufacturing this product. @endif Add Product Component Attachment Title Good job! Enter Attachment Title Attach Files Choose file Good job!     + X Opening Stock by Size and Stage @if($openingStock->count() > 0) @foreach($openingStock as $stock) Select Size @foreach($size as $sizeItem) size_id == $sizeItem->head_id ? 'selected' : ''}}>{{$sizeItem->name}} @endforeach Select Stage @foreach($pstage as $stage) stage_id == $stage->head_id ? 'selected' : ''}}>{{$stage->name}} @endforeach Remove @endforeach @else Select product sizes and stages first, then add opening stock for each size-stage combination below. @endif Add Opening Stock Description {{$product['description']}} Submit