From 332fae055b6561eb5040194427bf9ae22f977deb Mon Sep 17 00:00:00 2001 From: swdee Date: Thu, 12 Mar 2026 11:30:50 +1300 Subject: [PATCH] added in fallback of LCSC barcode scan to search on supplier part number, which scans the orderdetails DB table --- .../LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php index 260506ae..3cf01249 100644 --- a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php +++ b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php @@ -142,7 +142,8 @@ final readonly class BarcodeScanResultHandler } if ($barcodeScan instanceof LCSCBarcodeScanResult) { - return $this->resolvePartFromLCSC($barcodeScan); + return $this->resolvePartFromLCSC($barcodeScan) + ?? $this->em->getRepository(Part::class)->getPartBySPN($barcodeScan->mpn); } if ($barcodeScan instanceof AmazonBarcodeScanResult) {