fix: improve CSV number format handling for non-USD currencies #1820
Reference in New Issue
Block a user
Delete Branch "fix/csv-number-format-1713"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://github.com/user-attachments/assets/23433056-89fa-4327-a81b-5468b8ce0efa
Fixes: #1713
/claim #1713
Solution
Implemented a more robust number sanitization system that:
Added support for multiple number formats:
Enhanced the
sanitize_numbermethod to:Added comprehensive tests covering:
Testing
Added a new test file
test/models/import/number_sanitization_test.rbwith 36 assertions covering:I'm testing out the csv import feature and the amount format doesn't work, would this fix it?
I'm selecting the format 1.234,56 but the data is parsed as if I had selected 1,234.56. Going back to the previous step shows the wrong amount format selected.
https://github.com/user-attachments/assets/79d7330c-a571-4151-a4b7-263c8712d855
Pull request closed