@php $chunks = $items->chunk(6); $page = 1; $totalPages = $chunks->count(); @endphp @foreach($chunks as $chunk)
WIWU Shipment Products
Product photos, barcodes and quantities from shipment packing list
Page {{ $page }} / {{ $totalPages }}
{{ $shipment->items_count }} shipment lines
@foreach($chunk->chunk(3) as $row) @foreach($row as $index => $item) @php $product = $item->product; $imagePath = public_path('storage/' . $product->main_image); @endphp @endforeach @for($i = $row->count(); $i < 3; $i++) @endfor @endforeach
@if(file_exists($imagePath)) @else No Image @endif
#{{ str_pad(($loop->parent->iteration - 1) * 3 + $loop->iteration + (($page - 1) * 6), 2, '0', STR_PAD_LEFT) }}
{{ $product->name }}
SKU: {{ $item->sku ?: $product->sku }}
Barcode: {{ $item->barcode ?: $product->barcode }}
Qty: {{ $item->qty }}
CTN: {{ $item->ctn ?: '-' }}
Barcode Verified
@if(!$loop->last)
@endif @php $page++; @endphp @endforeach