[PR #2399] [MERGED] Update csv amount parser. Fix #2374 #18647

Closed
opened 2026-04-14 20:48:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2399
Author: @youngcw
Created: 2/26/2024
Status: Merged
Merged: 2/28/2024
Merged by: @youngcw

Base: masterHead: youngcw/csv-parse


📝 Commits (5)

📊 Changes

3 files changed (+13 additions, -6 deletions)

View changed files

📝 packages/loot-core/src/shared/util.test.ts (+6 -5)
📝 packages/loot-core/src/shared/util.ts (+1 -1)
upcoming-release-notes/2399.md (+6 -0)

📄 Description

Attempt to fix #2374.

This puts a strict limit to 1 or 2 decimal places. The test is complaining because there is one that passes in three decimal places. Are there regions where decimal amounts have more than 2 digits? If so then this bug is unfixable without a major overhaul of the parsing to have a known data format, where currently the parsing is format agnostic.

Looks like there are a few places that have 3 decimal places for financial data, mostly in the middle east. Im not sure there is a way to fix the issue without blocking potential users from those countries. Does anyone else have ideas on how to parse the csv in the issue without limiting to 2 decimal places?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/2399 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 2/26/2024 **Status:** ✅ Merged **Merged:** 2/28/2024 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `youngcw/csv-parse` --- ### 📝 Commits (5) - [`daad48d`](https://github.com/actualbudget/actual/commit/daad48d5b4b7127430eb536a7ce98321ba03d56c) specify 2 decimal places in the csv amount parser - [`20f3346`](https://github.com/actualbudget/actual/commit/20f334679bd25e2beb1f22f7701a8c0219751bf9) note - [`3d1be9a`](https://github.com/actualbudget/actual/commit/3d1be9a0b2340b2d2a0a997155286c510e5bd8a2) Merge branch 'master' into youngcw/csv-parse - [`efed584`](https://github.com/actualbudget/actual/commit/efed584fc59df1e059f6f64fb99a852b3d17b3f1) update tests - [`bd078cb`](https://github.com/actualbudget/actual/commit/bd078cbcac0485d2265797d9a42571bb99566600) cleanup ### 📊 Changes **3 files changed** (+13 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/shared/util.test.ts` (+6 -5) 📝 `packages/loot-core/src/shared/util.ts` (+1 -1) ➕ `upcoming-release-notes/2399.md` (+6 -0) </details> ### 📄 Description Attempt to fix #2374. This puts a strict limit to 1 or 2 decimal places. The test is complaining because there is one that passes in three decimal places. Are there regions where decimal amounts have more than 2 digits? If so then this bug is unfixable without a major overhaul of the parsing to have a known data format, where currently the parsing is format agnostic. Looks like there are a few places that have 3 decimal places for financial data, mostly in the middle east. Im not sure there is a way to fix the issue without blocking potential users from those countries. Does anyone else have ideas on how to parse the csv in the issue without limiting to 2 decimal places? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-14 20:48:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#18647