mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 11:48:49 +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
|
||||
return match ($currency) {
|
||||
'US$' => 'USD',
|
||||
'US$', '$' => 'USD',
|
||||
'€' => 'EUR',
|
||||
'A$' => 'AUD',
|
||||
'C$' => 'CAD',
|
||||
|
@ -231,7 +231,8 @@ class LCSCProvider implements InfoProviderInterface
|
|||
'kr' => 'SEK',
|
||||
'kr.' => 'DKK',
|
||||
'₹' => '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