Allow to read amazon labels for part retrieval and creation

This commit is contained in:
Jan Böhmer
2026-02-22 23:16:39 +01:00
parent 87919eb445
commit 0b9b2cbf58
7 changed files with 103 additions and 9 deletions

View File

@@ -101,6 +101,10 @@ final class BarcodeScanHelper
return $this->parseLCSCBarcode($input);
}
if ($type === BarcodeSourceType::AMAZON) {
return new AmazonBarcodeScanResult($input);
}
//Null means auto and we try the different formats
$result = $this->parseInternalBarcode($input);
@@ -135,6 +139,11 @@ final class BarcodeScanHelper
return $this->parseLCSCBarcode($input);
}
//Try amazon barcode
if (AmazonBarcodeScanResult::isAmazonBarcode($input)) {
return new AmazonBarcodeScanResult($input);
}
throw new InvalidArgumentException('Unknown barcode');
}