@extends('dompdf.LayoutBoostrapOnly') @section('content') @php $data_count = 1; $count_all = count($datalist); @endphp @foreach ($datalist as $key => $value) {{-- @if ($key != 0)
@endif --}} @php $no_now = $key+1; @endphp @if ($value->unit == "PCS")

{{$value->sku}}-{{$value->product_name}}-{{$value->unit}}

@foreach ($value->qrcode as $key_details => $value_details) @if ($data_count == 1)
@endif
barcode

{{ $value_details->qrcode}}

@if ($data_count == 10)
@php $data_count = 1; @endphp @else @php $data_count++; @endphp @endif @endforeach @if ($data_count != 1) @php $data_count = 1; @endphp @endif @if($no_now != $count_all)
@endif @else @php $no_set = 1; $count_row = 1; $first_time_only = 1; $no_detail_now = 1; $count_detail_all = count($value->qrcode); @endphp @foreach ($value->qrcode as $key_details => $value_details) @php $no_detail_now++; @endphp

{{$value->sku}}-{{$value->product_name}}-{{$value->unit}}-{{$no_set}}

barcode

{{ $key_details}}



@foreach ($value_details->qrcode_item as $key_sub_details => $value_sub_details) @if ($data_count == 1)
@endif
barcode

{{ $value_sub_details->qrcode}}

@if ($data_count == 10)
@php $data_count = 1; if($count_row == 3 && $first_time_only == 1){ $count_row = 1; $first_time_only = 0; @endphp
@php } else if($count_row == 5){ $count_row = 1; @endphp
@php } else{ $count_row++; } @endphp @else @php $data_count++; @endphp @endif @endforeach @if ($data_count != 1) @php $data_count = 1; @endphp @endif @php $no_set++; @endphp @if($no_now != $count_all && $count_detail_all != $no_detail_now)
@endif @endforeach @endif @endforeach @endsection