From 4d507a7ca312110f0ba37fb69e0303e477001bba Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 24 Feb 2026 13:29:00 +0530 Subject: [PATCH] Added wire pallet pdf blade file --- resources/views/pdf/wire-pallet.blade.php | 372 ++++++++++++++++++++++ 1 file changed, 372 insertions(+) create mode 100644 resources/views/pdf/wire-pallet.blade.php diff --git a/resources/views/pdf/wire-pallet.blade.php b/resources/views/pdf/wire-pallet.blade.php new file mode 100644 index 0000000..2f40a0b --- /dev/null +++ b/resources/views/pdf/wire-pallet.blade.php @@ -0,0 +1,372 @@ + + + + + WireLabel + @php + + $pageHeightMm = 100; + $pageWidthMm = 85; + $paddingMm = 1.3; + + + $headerRows = [ + 'PRODUCT' => $product, + 'MONTH/YEAR' => $monthYear, + 'CUSTOMER PO' => $customerCode, + 'CUSTOMER NAME' => $customerName, + 'NO OF MASTER BOX' => $masterBox, + ]; + + $titleHeight = 10; + $headerRowHeight = 5; + $itemHeaderHeight = 5; + + // 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); // 97.4mm + + $numItems = count($items) ?: 1; + + // Total fixed space + $fixedSpace = $titleHeight + + (5 * $headerRowHeight) + // 6 header rows + $itemHeaderHeight + + $grossWeightHeight + + $netWeightHeight + + $licenseHeight + + $companyInfoHeight; + + $spaceForItemsOnly = $availableHeight - $fixedSpace; //97.4 - 68 = 29.4mm + + // $itemRowHeight = $spaceForItemsOnly / $numItems; // 29.4 / 2 = 14.7 + + $itemRowHeight = floor(($spaceForItemsOnly / $numItems) * 10) / 10; + + // $itemRowHeight -= 0.5; + if ($numItems == 1) { + $itemRowHeight -= 0.5; + } + + 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'; + } + + // Compensate for borders (0.3mm top + 0.3mm bottom = 0.6mm) + $compensatedTitleHeight = $titleHeight - 0.6; + $compensatedHeaderHeight = $headerRowHeight - 0.6; + $compensatedItemHeaderHeight = $itemHeaderHeight - 0.6; + $compensatedItemHeight = $itemRowHeight - 0.6; + $compensatedGrossHeight = $grossWeightHeight - 0.6; + $compensatedNetHeight = $netWeightHeight - 0.6; + $compensatedLicenseHeight = $licenseHeight - 0.6; + $compensatedCompanyHeight = $companyInfoHeight - 0.6; + $qrBase64 = 'data:image/png;base64,' . base64_encode( + QrCode::format('png') + ->size(120) // 12mm ~ 120px + ->margin(0) + ->generate($pallet) + ); + @endphp + + + + + + + + + + + + + $value): ?> + {{-- + + + --}} + + + + + + + + + + + + + + + + + 0): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ {{-- --}} + + C.R.I POLY WRAPPED WINDING WIRE +
+ {{-- --}} + +
:
MATERIAL CODEDESCRIPTIONQTYNO OF BOX
code; ?>description; ?>weight, 3); ?>box_count; ?>
No items available
GROSS WEIGHT
NET WEIGHT
+ {{-- MANUFACTURERS MADE IN INDIA *UNDER LICENSE --}} + 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 036
+ For Feedback/Complaint: C.R.I Customer care cell Toll-Free: 1800 121 1243 + {{-- --}} +
+ + -- 2.49.1