@php
$loop_count = 0;
@endphp
@foreach($product_details as $details)
@while($details['qty'] > 0)
@php
$loop_count += 1;
$is_new_row = (!$barcode_details->is_continuous) && (($loop_count == 1) || ($loop_count % $barcode_details->stickers_in_one_row) == 1) ? true : false;
@endphp
@if(($barcode_details->is_continuous && $loop_count == 1) || (!$barcode_details->is_continuous && ($loop_count % $barcode_details->stickers_in_one_sheet) == 1))
{{-- Actual Paper --}}
{{-- Paper Internal --}}
@endif
@if((!$barcode_details->is_continuous) && ($loop_count % $barcode_details->stickers_in_one_sheet) <= $barcode_details->stickers_in_one_row)
@php $first_row = true @endphp
@elseif($barcode_details->is_continuous && ($loop_count <= $barcode_details->stickers_in_one_row) )
@php $first_row = true @endphp
@else
@php $first_row = false @endphp
@endif
{{-- Business Name --}}
@if(!empty($print['business_name']))
{{$business_name}}
@endif
{{-- Product Name --}}
@if(!empty($print['name']))
{{$details['details']->product_actual_name}}
@endif
{{-- Variation --}}
@if(!empty($print['variations']) && $details['details']->is_dummy != 1)
{{$details['details']->product_variation_name}}:{{$details['details']->variation_name}}
@endif
{{-- Price --}}
@if(!empty($print['price']))
Price:
@if($print['price_type'] == 'inclusive')
{{$details['details']->sell_price_inc_tax}}
@else
{{$details['details']->default_sell_price}}
@endif
@endif
{{-- Barcode --}}
@if(!$barcode_details->is_continuous && ($loop_count % $barcode_details->stickers_in_one_sheet) == 0)
{{-- Actual Paper --}}
{{-- Paper Internal --}}
@endif
@php
$details['qty'] = $details['qty'] - 1;
@endphp
@endwhile
@endforeach
@if($barcode_details->is_continuous || ($loop_count % $barcode_details->stickers_in_one_sheet) != 0)
{{-- Actual Paper --}}
{{-- Paper Internal --}}
@endif