Bug 458346 - Display of balances is not correct when filters are active
Summary: Display of balances is not correct when filters are active
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-26 15:41 UTC by Thomas Baumgart
Modified: 2024-08-17 20:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2022-08-26 15:41:08 UTC
The balances shown in the ledger are incorrect during reconciliation and when a start date filter is set.

STEPS TO REPRODUCE
1. With transactions prior to 1.1.2022 set the start date filter to 1.1.2022
2. Open a ledger of an account that has such transactions

1. Open account with prior reconciliation
2. Start new reconciliation
3. Fill in the ending balance and statement date
4. Continue with the reconciliation

OBSERVED RESULT
Balances shown are incorrect

EXPECTED RESULT
Correct balances are provided no matter which filter is set

ADDITIONAL INFORMATION
The summary line shown for the reconciliation has the correct amounts. Since the balances are calculated on the fly, it seems that the wrong model (the one with the filter) is used to do that calculation.
Comment 1 Thomas Baumgart 2022-08-27 13:33:20 UTC
Git commit 7c88bb519cb508b46f760d61dff484eed0a52062 by Thomas Baumgart.
Committed on 27/08/2022 at 10:22.
Pushed by tbaumgart into branch 'master'.

Calculate balance per transaction using all transactions

Using a filter would provide wrong balance values per transaction

M  +36   -29   kmymoney/views/ledgeraccountfilter.cpp

https://invent.kde.org/office/kmymoney/commit/7c88bb519cb508b46f760d61dff484eed0a52062