mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-18 17:31:35 +00:00
Allow to read amazon labels for part retrieval and creation
This commit is contained in:
parent
87919eb445
commit
0b9b2cbf58
7 changed files with 103 additions and 9 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue