Bug 508033

Summary: hiding reconciled transactions alters (incorrectly) running balance in ledger
Product: [Applications] kmymoney Reporter: Jack <ostroffjh>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.2.2
Sentry Crash Report:
Attachments: xml data file which demonstrated the problem

Description Jack 2025-08-08 22:22:21 UTC
Created attachment 183892 [details]
xml data file which demonstrated the problem

If you have a reconciliation as of (for example) 2025-02-01 with reconciled transactions prior to that date, and also one not reconciled transaction (for example 2025-01-31) then hiding reconciled transactions omits the amount of that not reconciled transaction from the running balance in the ledger, but not from the total or cleared balance displayed below the ledger.  Confirmed in git master, a 5.2 appimage.  Confirmed works correctly in a 5.1 appimage.

I’m not certain if this might be related to the fix for https://bugs.kde.org/show_bug.cgi?id=494069.  That was specifically for liability accounts, and related to reversing the sign of the initial transaction in that case. which is why it seems not the same.
Comment 1 Thomas Baumgart 2025-08-10 15:29:13 UTC
Git commit 3b69e75542cd4c3663dd371fb812cd3b198b5cb3 by Thomas Baumgart.
Committed on 10/08/2025 at 15:29.
Pushed by tbaumgart into branch 'master'.

Don't modify running balance when hiding reconciled transactions globally
FIXED-IN: 5.2.2

M  +0    -7    kmymoney/models/ledgersortproxymodel.cpp
M  +20   -7    kmymoney/models/specialledgeritemfilter.cpp
M  +7    -0    kmymoney/views/ledgerviewpage.cpp

https://invent.kde.org/office/kmymoney/-/commit/3b69e75542cd4c3663dd371fb812cd3b198b5cb3
Comment 2 Thomas Baumgart 2025-08-12 18:19:40 UTC
Git commit d892ba446fa1f06214c556d152d2582ceb49dfd1 by Thomas Baumgart.
Committed on 12/08/2025 at 18:19.
Pushed by tbaumgart into branch '5.2'.

Don't modify running balance when hiding reconciled transactions globally
FIXED-IN: 5.2.2
(cherry picked from commit 3b69e75542cd4c3663dd371fb812cd3b198b5cb3)

M  +0    -7    kmymoney/models/ledgersortproxymodel.cpp
M  +20   -7    kmymoney/models/specialledgeritemfilter.cpp
M  +7    -0    kmymoney/views/ledgerviewpage.cpp

https://invent.kde.org/office/kmymoney/-/commit/d892ba446fa1f06214c556d152d2582ceb49dfd1