[PR #5528] [MERGED] [BUG] Fix incorrect mathematic calculation in reconcile window #5982

Closed
opened 2026-02-28 21:22:01 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5528
Author: @junyuanz1
Created: 8/8/2025
Status: Merged
Merged: 8/9/2025
Merged by: @matt-fidd

Base: masterHead: fix-5527-reconcile-math-calculations


📝 Commits (10+)

  • 581fbd4 [Bug 5527] Fix incorrect mathmatic equation in resoncile window
  • f63a6da fix linter
  • 019e728 update
  • ec12e4c add note
  • d57b822 [autofix.ci] apply automated fixes
  • 02f3b0a fix linter
  • ee49a61 fix linter & type
  • 31953d3 Merge remote-tracking branch 'junyuanz/fix-5527-reconcile-math-calculations' into fix-5527-reconcile-math-calculations
  • 185bbc5 fix typing error
  • 7c10191 fix lint and typing

📊 Changes

3 files changed (+276 additions, -2 deletions)

View changed files

packages/desktop-client/src/components/accounts/Reconcile.test.tsx (+263 -0)
📝 packages/desktop-client/src/components/accounts/Reconcile.tsx (+7 -2)
upcoming-release-notes/5528.md (+6 -0)

📄 Description

Purpose: Fix incorrect mathematical equation calculations in the
reconcile window (Bug #5527)

Key Changes:

  1. Fixed arithmetic evaluation in Reconcile.tsx:155-163:
    - Replaced currencyToInteger() with proper arithmetic evaluation using
    evalArithmetic()
    - Added amountToInteger() for correct amount conversion
    - Now properly evaluates mathematical expressions (e.g.,
    "100+25.50-10") instead of treating them as literal strings
  2. Added comprehensive test coverage in Reconcile.test.tsx:
    - 231 lines of new tests covering reconciliation math scenarios
    - Tests for positive/negative differences, arithmetic expressions, edge
    cases
    - Validates that reconciliation amounts are correctly calculated and
    passed

Impact: Users can now enter mathematical expressions in reconcile inputs
and have them properly evaluated, fixing the core calculation bug


🔄 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/5528 **Author:** [@junyuanz1](https://github.com/junyuanz1) **Created:** 8/8/2025 **Status:** ✅ Merged **Merged:** 8/9/2025 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `fix-5527-reconcile-math-calculations` --- ### 📝 Commits (10+) - [`581fbd4`](https://github.com/actualbudget/actual/commit/581fbd47cf519e8dacdc3c63da86020f23bf7df8) [Bug 5527] Fix incorrect mathmatic equation in resoncile window - [`f63a6da`](https://github.com/actualbudget/actual/commit/f63a6da5ed890d904a6d8c117679b533afb45fdf) fix linter - [`019e728`](https://github.com/actualbudget/actual/commit/019e728b82209174ac0c220fc4d17451886a6ee2) update - [`ec12e4c`](https://github.com/actualbudget/actual/commit/ec12e4c26de355886985e6e66ca21faf1af87d88) add note - [`d57b822`](https://github.com/actualbudget/actual/commit/d57b8221b089f15e127aa16e1875483ed9c9b731) [autofix.ci] apply automated fixes - [`02f3b0a`](https://github.com/actualbudget/actual/commit/02f3b0a3065c4807976f78b73b3c3a64d6303be4) fix linter - [`ee49a61`](https://github.com/actualbudget/actual/commit/ee49a61aef1964721689df0550e4b0550a5716b6) fix linter & type - [`31953d3`](https://github.com/actualbudget/actual/commit/31953d3d8ae1660d6535793f1630a561b23e229d) Merge remote-tracking branch 'junyuanz/fix-5527-reconcile-math-calculations' into fix-5527-reconcile-math-calculations - [`185bbc5`](https://github.com/actualbudget/actual/commit/185bbc5fe44f62e6b5ebcc006686031e64b2ba2c) fix typing error - [`7c10191`](https://github.com/actualbudget/actual/commit/7c1019166350d074aa9a92e629fb56b4736e00f3) fix lint and typing ### 📊 Changes **3 files changed** (+276 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `packages/desktop-client/src/components/accounts/Reconcile.test.tsx` (+263 -0) 📝 `packages/desktop-client/src/components/accounts/Reconcile.tsx` (+7 -2) ➕ `upcoming-release-notes/5528.md` (+6 -0) </details> ### 📄 Description Purpose: Fix incorrect mathematical equation calculations in the reconcile window (Bug #5527) Key Changes: 1. Fixed arithmetic evaluation in Reconcile.tsx:155-163: - Replaced currencyToInteger() with proper arithmetic evaluation using evalArithmetic() - Added amountToInteger() for correct amount conversion - Now properly evaluates mathematical expressions (e.g., "100+25.50-10") instead of treating them as literal strings 2. Added comprehensive test coverage in Reconcile.test.tsx: - 231 lines of new tests covering reconciliation math scenarios - Tests for positive/negative differences, arithmetic expressions, edge cases - Validates that reconciliation amounts are correctly calculated and passed Impact: Users can now enter mathematical expressions in reconcile inputs and have them properly evaluated, fixing the core calculation bug --- <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-02-28 21:22:01 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5982