You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix account breakdown percentage calculation in net totals mode and enhance unit tests
- Corrected the denominator used for account breakdown percentages in net totals mode to reflect the sum of absolute values of net spending, ensuring accurate percentage calculations.
- Added unit tests for account breakdown percentage calculations in both net totals and absolute modes, including scenarios with negative net spending and edge cases.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
26
26
- Fixed category totals calculation bug where income transactions (e.g., refunds) in the same category as expenses were not reducing the category total. Now correctly shows net spending (e.g., -$100 expense + $50 income = $50 net spending)
27
27
- Fixed payee totals calculation: Income transactions (e.g., refunds) now reduce payee totals when net totals mode is enabled
28
28
- Fixed account breakdown totals: Income transactions now reduce account totals when net totals mode is enabled
29
+
- Fixed account breakdown percentage calculation: Account breakdown percentages now use the correct denominator when net totals mode is enabled (sum of absolute values of net spending) instead of total expenses, fixing incorrect percentages that didn't sum to 100% and could be negative
29
30
- Fixed day of week spending totals: Income transactions now reduce day totals when net totals mode is enabled
30
31
31
32
### Tests
32
33
33
34
- Added comprehensive unit tests for net totals calculation mode, covering categories, payees, and account breakdown in both new mode (with income) and old mode (expenses only), including scenarios with multiple income and expense transactions
35
+
- Added unit tests for account breakdown percentage calculation in both net totals mode and absolute mode, including edge cases with negative net spending
0 commit comments