Added 2 copies of pallet number print for scan pallet

This commit is contained in:
dhanabalan
2025-07-29 13:26:13 +05:30
parent 0bde54cf1a
commit ab769d2287

View File

@@ -24,18 +24,7 @@ class PalletController extends Controller
$qrBinary = $output->output($qrCode, 100);
$qrBase64 = base64_encode($qrBinary);
return '
<html>
<head>
<style>
body { margin: 0; padding: 0; width: 60mm; height: 14mm; font-size: 10pt; font-family: DejaVu Sans, sans-serif; }
.sticker-table { width: 60mm; height: 14mm; border-collapse: collapse; }
.qr-cell { width: 14mm; text-align: right; vertical-align: bottom; padding-left: 6mm; padding-top: 0mm; }
.text-cell { text-align: left; vertical-align: middle; font-size: 16pt; padding-left: 1mm; padding-top: 2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
img.qr { width: 13mm; height: 13mm; display: block; }
</style>
</head>
<body>
$htmlBlock = '
<table class="sticker-table">
<tr>
<td class="qr-cell">
@@ -45,18 +34,31 @@ class PalletController extends Controller
' . htmlspecialchars($palletNo) . '
</td>
</tr>
</table>
</table>';
return '
<html>
<head>
<style>
body { margin: 0; padding: 0; width: 60mm; height: auto; font-size: 10pt; font-family: DejaVu Sans, sans-serif; }
.sticker-table { width: 60mm; height: 14mm; border-collapse: collapse; page-break-after: always; }
.qr-cell { width: 14mm; text-align: right; vertical-align: bottom; padding-left: 6mm; padding-top: 0mm; }
.text-cell { text-align: left; vertical-align: middle; font-size: 16pt; padding-left: 1mm; padding-top: 2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
img.qr { width: 13mm; height: 13mm; display: block; }
</style>
</head>
<body>
' . $htmlBlock . $htmlBlock . '
<script>
window.onload = function () {
window.print();
setTimeout(function () {
window.close();
}, 500); // Wait 0.5 seconds before closing
}, 1000); // Wait 1 second before closing
};
</script>
</body>
</html>
';
</html>';
// $mpdf = new Mpdf([
// 'mode' => 'utf-8',