Bug 458346

Summary: Display of balances is not correct when filters are active
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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