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

Closed
opened 2026-04-10 21:45:29 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/5528

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/actualbudget/actual/pull/5528 **State:** closed **Merged:** Yes --- 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
GiteaMirror added the pull-request label 2026-04-10 21:45:29 -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#13037