[GH-ISSUE #2374] [Bug]: CSV import - large transactions are parsed wrong #26730

Closed
opened 2026-04-18 03:03:29 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @RMStyle on GitHub (Feb 18, 2024).
Original GitHub issue: https://github.com/actualbudget/actual/issues/2374

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I have checked my server logs and could not see any errors there
  • I will be attaching my server logs to this issue
  • I will be attaching my client-side (browser) logs to this issue
  • I understand that this issue will be automatically closed if insufficient information is provided

What happened?

When importing a CSV from my bank, large numbers are exported like this: '-3.000'. This causes actual to import it as 3,00 which is wrong.

Possible solution: Allow users to set limiters for cents and thousands.

Probably linked to #1051 and #1029

What error did you receive?

No response

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Linux

Originally created by @RMStyle on GitHub (Feb 18, 2024). Original GitHub issue: https://github.com/actualbudget/actual/issues/2374 ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### Is this related to GoCardless, Simplefin or another bank-sync provider? - [ ] I have checked my server logs and could not see any errors there - [ ] I will be attaching my server logs to this issue - [ ] I will be attaching my client-side (browser) logs to this issue - [X] I understand that this issue will be automatically closed if insufficient information is provided ### What happened? When importing a CSV from my bank, large numbers are exported like this: '-3.000'. This causes actual to import it as 3,00 which is wrong. Possible solution: Allow users to set limiters for cents and thousands. Probably linked to #1051 and #1029 ### What error did you receive? _No response_ ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox ### Operating System Linux
GiteaMirror added the bug label 2026-04-18 03:03:29 -05:00
Author
Owner

@youngcw commented on GitHub (Feb 19, 2024):

Do you have an example file you could add? It can be redacted. Its hard to track down the issue without an example.

<!-- gh-comment-id:1953017958 --> @youngcw commented on GitHub (Feb 19, 2024): Do you have an example file you could add? It can be redacted. Its hard to track down the issue without an example.
Author
Owner

@RMStyle commented on GitHub (Feb 19, 2024):

Thanks for the fast reply! I will do that, but won't be able to do so before the weekend.

<!-- gh-comment-id:1953112363 --> @RMStyle commented on GitHub (Feb 19, 2024): Thanks for the fast reply! I will do that, but won't be able to do so before the weekend.
Author
Owner

@RMStyle commented on GitHub (Feb 23, 2024):

@youngcw as promised, here's the CSV
testdata_actual.csv

<!-- gh-comment-id:1961627476 --> @RMStyle commented on GitHub (Feb 23, 2024): @youngcw as promised, here's the CSV [testdata_actual.csv](https://github.com/actualbudget/actual/files/14387587/testdata_actual.csv)
Author
Owner

@youngcw commented on GitHub (Feb 26, 2024):

So it looks like the issue is that your bank is sometimes not including the decimal digits. Then Actual is not parsing correct. Does that seem right?

Its weird that sometimes the value excludes the decimal values.

<!-- gh-comment-id:1964870710 --> @youngcw commented on GitHub (Feb 26, 2024): So it looks like the issue is that your bank is sometimes not including the decimal digits. Then Actual is not parsing correct. Does that seem right? Its weird that sometimes the value excludes the decimal values.
Author
Owner

@youngcw commented on GitHub (Feb 26, 2024):

Slowly digging into this. The broken parsing is in `packages/loot-core/src/shared/util.ts#looselyParseAmount. The value goes in as a string and out as the wrong number

<!-- gh-comment-id:1965050925 --> @youngcw commented on GitHub (Feb 26, 2024): Slowly digging into this. The broken parsing is in `packages/loot-core/src/shared/util.ts#looselyParseAmount. The value goes in as a string and out as the wrong number
Author
Owner

@youngcw commented on GitHub (Feb 26, 2024):

@RMStyle Can you try out that PR? I think it fixes your issue.

<!-- gh-comment-id:1965148553 --> @youngcw commented on GitHub (Feb 26, 2024): @RMStyle Can you try out that PR? I think it fixes your issue.
Author
Owner

@youngcw commented on GitHub (Feb 26, 2024):

So that PR limits decimal places to 2, which causes your csv to parse right, but will potentially break parsing for people with 3 decimal place currency numbers (there are a few). If you are up to it, a script to clean your csv's would be pretty simple, or reach out to your bank and ask them to not be weird and always add the decimal places to the numbers, even if its zeros

<!-- gh-comment-id:1965351552 --> @youngcw commented on GitHub (Feb 26, 2024): So that PR limits decimal places to 2, which causes your csv to parse right, but will potentially break parsing for people with 3 decimal place currency numbers (there are a few). If you are up to it, a script to clean your csv's would be pretty simple, or reach out to your bank and ask them to not be weird and always add the decimal places to the numbers, even if its zeros
Author
Owner

@RMStyle commented on GitHub (Feb 28, 2024):

@youngcw wow, that's a fast development. I can try to contact the bank, this issue may be popping up more and more for German users, since the CSV is from the second-largest German bank DKB.

Another possible solution would be to allow users to set limiters for cents and thousands. But I'd understand if this is nothing you'd consider, since its adds complexity to the importer.

<!-- gh-comment-id:1968595603 --> @RMStyle commented on GitHub (Feb 28, 2024): @youngcw wow, that's a fast development. I can try to contact the bank, this issue may be popping up more and more for German users, since the CSV is from the second-largest German bank DKB. Another possible solution would be to allow users to set limiters for cents and thousands. But I'd understand if this is nothing you'd consider, since its adds complexity to the importer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#26730