chnaged logic in sticker reprint logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 2m23s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 2m23s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
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