@if ($product->serialized_product == 1 && $product->color_id <= 0 && $product->size_id <= 0 && @$is_install != 1)
@endif @if (count($product->colorChild) > 0) @php $color = $product->colorChild; @endphp
@elseif (count($product->sizeChild) > 0)
@else
@endif @if ($product->size_id || $product->color_id) @php $size_len = count($size); @endphp @foreach($size as $skey => $sz) @php $index_i = $index.$i; $clr_center = intval(count($color)/2); @endphp @foreach($color as $ckey => $clr) @php $index_j = $index.$j; $css = $item->colorSizeSerial->where('color_id', $clr->id)->where('size_id', $sz->id); @endphp
 
serialized_product != 1 && @$is_install != 1) ? 'step=".01"' : 'readonly') }} value="{{ $css->sum('quantity') }}" min="0" id="quantity{{ $index_j }}" name="quantity{{ $index }}[]" {{ (($product->serialized_product == 1) ? 'onchange="addSerialField('.$index.', '.$j.', this.value, '.$product->manufacture_code.')"' : '') }} class="form-control addQty{{ $index }}">
@if ($product->serialized_product == 1 && @$is_install != 1)
@elseif(@$is_install != 1) @endif
@if ($product->serialized_product == 1) @forelse ($item->colorSizeSerial->where('color_id', $clr->id)->where('size_id', $sz->id) as $sl) @php $vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no); @endphp
@if (@$is_install != 1) @endif serial_count <= 1 && @$is_install != 1) ? '' : 'readonly' }} title="Serial" value="{{ $sl->serial_no }}" placeholder="Enter Serial" class="form-control {{ $type == 2 ? '' : 'check_duplicate'.$index_j }}" required id="sl_{{$vl}}" name="serial{{ $index_j }}[]"/>
@if ($item->product->manufacture_code == 1)
@endif @if (@$is_install != 1 && ($sl->serial_count <= 1 || ($type == 2 && ($sl->serial_count%2) == 0) || ($item->transaction_type == 4 && ($sl->serial_count%2) == 1))) @endif
@empty @endforelse @endif
@php $j++; @endphp @endforeach @if ($j == 1) @php $ss = $item->colorSizeSerial->where('size_id', $sz->id); @endphp
serialized_product != 1? 'step=".01"' : 'readonly') }} min="0" id="quantity{{ $index_i }}" name="quantity{{ $index }}[]" {{ (($product->serialized_product == 1) ? 'onchange="addSerialField('.$index.', '.$i.', this.value, '.$product->manufacture_code.')"':'onkeyup=this.value<0?this.value=0:()=>{}')}} class="form-control addQty{{ $index }}">
@if ($product->serialized_product == 1 && @$is_install != 1)
@elseif (@$is_install != 1) @endif
@if ($product->serialized_product == 1) @forelse ($item->colorSizeSerial->where('size_id', $sz->id) as $sl) @php $vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no); @endphp
@if (@$is_install != 1) @endif serial_count <= 1 && @$is_install != 1) ? '' : 'readonly' }} title="Serial" value="{{ $sl->serial_no }}" placeholder="Enter Serial" class="form-control {{ $type == 2 ? '' : 'check_duplicate'.$index_i }}" required id="sl_{{$vl}}" name="serial{{ $index_i }}[]"/>
@if ($item->product->manufacture_code == 1)
@endif @if (@$is_install != 1 && ($sl->serial_count <= 1 || ($type == 2 && ($sl->serial_count%2) == 0) || ($item->transaction_type == 4 && ($sl->serial_count%2) == 1))) @endif
@empty @endforelse @endif
@endif @php $i++; @endphp @if($skey < ($size_len-1))
@endif @endforeach @else
serialized_product != 1? 'step=".01"':'readonly') }} min="0" id="quantity{{ $index_i }}" name="quantity{{ $index }}[]" {{ (($product->serialized_product == 1) ? 'onchange="addSerialField('.$index.', 1, this.value, '.$product->manufacture_code.')"' : 'onkeyup=this.value<0?this.value=0:()=>{}') }} class="form-control addQty{{ $index }}">
@forelse ($item->colorSizeSerial as $sl) @php($vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no))
@if (@$is_install != 1) @endif @if ($type == 2) @endif serial_count <= 1 && @$is_install != 1) ? '' : 'readonly' }} title="Serial" value="{{ $sl->serial_no }}" placeholder="Enter Serial" class="form-control {{ $type == 2 ? '' : 'check_duplicate'.$index_i }}" required id="sl_{{$vl}}" name="serial{{ $index_i }}[]"/>
@if ($item->product->manufacture_code == 1)
@endif @if (@$is_install != 1 && ($sl->serial_count <= 1 || ($type == 2 && ($sl->serial_count%2) == 0) || ($item->transaction_type == 4 && ($sl->serial_count%2) == 1))) @endif
@empty @endforelse
@endif