chnaged logic in sticker reprint logic
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user