@php $pageHeightMm = 292; $pageWidthMm = 100; $paddingMm = 1.3; $headerRows = [ 'MFG. MONTH & YEAR' => $monthYear, 'SALE ORDER NO' => $customerCode, 'SUPPLIER NAME' => $customerName, 'MASTER BOX NO.' => $masterBox, ]; $titleHeight = 10; $headerRowHeight = 5; $itemHeaderHeight = 14; // FOOTER SECTION $grossWeightHeight = 5; $netWeightHeight = 5; $licenseHeight = 5; $companyInfoHeight = 6.9; $logoHeight = $titleHeight * 0.8; $logoMaxWidth = 20; $isilogoHeight = $titleHeight * 0.9; $isilogoMaxWidth = 11; $availableHeight = $pageHeightMm - (2 * $paddingMm); $itemPages = collect($items)->chunk(40); if ($itemPages->isEmpty()) { $itemPages = collect([ collect() ]); } $qrBase64 = 'data:image/png;base64,' . base64_encode( QrCode::format('png') ->size(120) ->margin(0) ->generate($pallet) ); @endphp @foreach ($itemPages as $pageItems) @php $numItems = count($pageItems) ?: 1; $fixedSpace = $titleHeight + (4 * $headerRowHeight) + $itemHeaderHeight + $netWeightHeight + $licenseHeight + $companyInfoHeight; $fixedRowCount = 1 /* title */ + 4 /* header rows */ + 1 /* items header */ + 1 /* net weight */ + 1 /* license */ + 1; /* company info */ $desiredBottomGap = 5; $spaceForItemsOnly = $availableHeight - $fixedSpace + ($fixedRowCount * 0.6) - $desiredBottomGap; $itemRowHeight = ($spaceForItemsOnly / $numItems) + 0.6; $maxItemRowHeight = 5; if ($itemRowHeight > $maxItemRowHeight) { $itemRowHeight = $maxItemRowHeight; } $itemRowHeight = floor($itemRowHeight * 10) / 10; if ($itemRowHeight < 3) { $itemFontSize = '5.5px'; $itemPadding = '0.1mm 0.3mm'; } elseif ($itemRowHeight < 3.5) { $itemFontSize = '6px'; $itemPadding = '0.1mm 0.4mm'; } elseif ($itemRowHeight < 4) { $itemFontSize = '6.5px'; $itemPadding = '0.1mm 0.5mm'; } else { $itemFontSize = '7px'; $itemPadding = '0.2mm 0.5mm'; } $compensatedItemHeight = $itemRowHeight - 0.6; $pageTotalQuantity = $pageItems->sum('weight'); @endphp
$value): ?> @if ($pageItems->count() > 0) @foreach ($pageItems as $item) @endforeach @else @endif
Master Packing Slip
MATERIAL CODE DESCRIPTION QTY in kg NO. OF BOXES
code; ?> description; ?> weight, 3); ?> box_count; ?>
No items available
TOTAL QUANTITY
MANUFACTURERS                  MADE IN INDIA               *Under License
C.R.I. PUMPS PRIVATE LIMITED
(Unit of {{ $plantName }})
{{ $plantAddress }}
India Regd.Office : 7/46-1, Keeranatham Road, Saravanampatti, Coimbatore- 641 035
For Feedback/Complaint: C.R.I. Customer care cell Toll-Free: 1800 121 1243
@endforeach