mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 19:58:53 +02:00
Fixed error, when retrieving prices in USD from LCSC
This fixes issue #552. It seems that LCSC changed their currency symbol for US-Dollar
This commit is contained in:
parent
03854aa207
commit
a5b101a0ea
1 changed files with 3 additions and 2 deletions
|
@ -218,7 +218,7 @@ class LCSCProvider implements InfoProviderInterface
|
||||||
{
|
{
|
||||||
//Decide based on the currency symbol
|
//Decide based on the currency symbol
|
||||||
return match ($currency) {
|
return match ($currency) {
|
||||||
'US$' => 'USD',
|
'US$', '$' => 'USD',
|
||||||
'€' => 'EUR',
|
'€' => 'EUR',
|
||||||
'A$' => 'AUD',
|
'A$' => 'AUD',
|
||||||
'C$' => 'CAD',
|
'C$' => 'CAD',
|
||||||
|
@ -231,7 +231,8 @@ class LCSCProvider implements InfoProviderInterface
|
||||||
'kr' => 'SEK',
|
'kr' => 'SEK',
|
||||||
'kr.' => 'DKK',
|
'kr.' => 'DKK',
|
||||||
'₹' => 'INR',
|
'₹' => 'INR',
|
||||||
default => throw new \RuntimeException('Unknown currency: ' . $currency)
|
//Fallback to the configured currency
|
||||||
|
default => $this->currency,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue