replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
261 stars 41 forks source link

[Bug]: System.FormatException while importing Mouser order (with € sign) #275

Closed galentrygon closed 1 month ago

galentrygon commented 1 month ago

Binner version

v2.6.3

Operating System

Linux x64

Describe the bug and the steps to reproduce it

While importing a mouser order, I receive an error System.FormatException. The input string '€ 51,24' was not in a correct format.

  1. go to Order Import
  2. select Mouser and input an existing order number
  3. get the error

Thank you for your amazing work! Michele

Would you like to attach your appsetings.json configuration?

No response

Screenshots or Videos (Optional, but they help!)

Screenshot from 2024-07-22 23-21-53 Screenshot from 2024-07-22 23-54-39

Are you able to contribute a PR? (No is ok!)

None

galentrygon commented 1 month ago

I think it may depends on the row: Amount = double.Parse(mouserOrderResponse.SummaryDetail?.OrderTotal.Replace("$", "") ?? "0"), in the file PartService.cs, wich replace the dollar sign but not the euro one. I tried locally to change $ with € and it seems to work. Obviously is not a solution, but just a confirmation of the faulty row ;-)

replaysMike commented 1 month ago

got it, I'm currently testing this and will try to repro

replaysMike commented 1 month ago

This is now fixed and will be available in v2.6.4