mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-19 18:01:30 +00:00
Do not use customer reference for digikey barcode creation info as it likely contains not the part number
Fixes #1285
This commit is contained in:
parent
84acfd9ff9
commit
91c257a53b
1 changed files with 3 additions and 3 deletions
|
|
@ -304,11 +304,11 @@ final readonly class BarcodeScanResultHandler
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Digi-Key: can use customerPartNumber or supplierPartNumber directly
|
// Digi-Key: supplierPartNumber directly
|
||||||
if ($vendor === 'digikey') {
|
if ($vendor === 'digikey') {
|
||||||
return [
|
return [
|
||||||
'providerKey' => 'digikey',
|
'providerKey' => 'digikey',
|
||||||
'providerId' => $scanResult->customerPartNumber ?? $scanResult->supplierPartNumber,
|
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Digikey barcode does not contain required supplier part number'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -316,7 +316,7 @@ final readonly class BarcodeScanResultHandler
|
||||||
if ($vendor === 'element14') {
|
if ($vendor === 'element14') {
|
||||||
return [
|
return [
|
||||||
'providerKey' => 'element14',
|
'providerKey' => 'element14',
|
||||||
'providerId' => $scanResult->supplierPartNumber,
|
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Element14 barcode does not contain required supplier part number'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue