Merge pull request 'Added proper logic in sticker reprint controller' (#113) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #113
This commit was merged in pull request #113.
This commit is contained in:
@@ -24,6 +24,8 @@ class ProductionStickerReprintController extends Controller
|
|||||||
{
|
{
|
||||||
$palletNo = urldecode($palletNo);
|
$palletNo = urldecode($palletNo);
|
||||||
|
|
||||||
|
$qrPayload = rtrim($palletNo, '|') . '|';
|
||||||
|
|
||||||
$parts = explode('|', $palletNo);
|
$parts = explode('|', $palletNo);
|
||||||
$itemCode = trim($parts[0]);
|
$itemCode = trim($parts[0]);
|
||||||
$serialNumberRaw = isset($parts[1]) ? trim($parts[1]) : null;
|
$serialNumberRaw = isset($parts[1]) ? trim($parts[1]) : null;
|
||||||
@@ -79,7 +81,7 @@ class ProductionStickerReprintController extends Controller
|
|||||||
// $palletNo = preg_replace('/\/.*/', '', $palletNo);
|
// $palletNo = preg_replace('/\/.*/', '', $palletNo);
|
||||||
|
|
||||||
// 5. Generate QR Code (base64)
|
// 5. Generate QR Code (base64)
|
||||||
$qrCode = new QrCode($palletNo);
|
$qrCode = new QrCode($qrPayload);
|
||||||
$output = new Output\Png();
|
$output = new Output\Png();
|
||||||
$qrBinary = $output->output($qrCode, 100); // 100 = size
|
$qrBinary = $output->output($qrCode, 100); // 100 = size
|
||||||
$qrBase64 = base64_encode($qrBinary);
|
$qrBase64 = base64_encode($qrBinary);
|
||||||
|
|||||||
Reference in New Issue
Block a user