1
0
forked from poc/pds

chnaged logic in sticker reprint logic

This commit is contained in:
dhanabalan
2025-12-18 16:21:10 +05:30
parent 810c40b81b
commit 7d5e02f491
2 changed files with 69 additions and 10 deletions

View File

@@ -22,6 +22,8 @@ class ProductionStickerReprintController extends Controller
public function downloadQrPdf($palletNo)
{
$palletNo = urldecode($palletNo);
$parts = explode('|', $palletNo);
$itemCode = trim($parts[0]);
$serialNumberRaw = isset($parts[1]) ? trim($parts[1]) : null;
@@ -50,14 +52,30 @@ class ProductionStickerReprintController extends Controller
$productionOrder = $production->production_order ?? '';
if ($item->category == 'Submersible Motor')
{
$copies = 1;
if(!preg_match('/\//', $palletNo)){
if ($item->category == 'Submersible Motor')
{
$copies = 1;
}
elseif ($item->category == 'Submersible Pump')
{
$copies = 2;
}
}
elseif ($item->category == 'Submersible Pump')
else
{
$copies = 2;
if ($item->category == 'Submersible Motor')
{
$copies = 1;
}
elseif ($item->category == 'Submersible Pump')
{
$copies = 1;
}
}
$palletNo = preg_replace('/\/.*/', '', $palletNo);
// 5. Generate QR Code (base64)
$qrCode = new QrCode($palletNo);
$output = new Output\Png();