Bug 462862 - Changing default sort order causes balance totals to read incorrectly on ledger page.
Summary: Changing default sort order causes balance totals to read incorrectly on ledg...
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-10 18:04 UTC by Micha Novak
Modified: 2022-12-10 18:11 UTC (History)
1 user (show)

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


Attachments
Screenshot showing the broken behavior (101.22 KB, image/png)
2022-12-10 18:11 UTC, Micha Novak
Details
Screenshot of the default behavior (104.58 KB, image/png)
2022-12-10 18:11 UTC, Micha Novak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Micha Novak 2022-12-10 18:04:10 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Load up KMyMoney
2. Create an Asset Account
3. Enter a series of transactions and note the balance listed on the most recent transaction
4. Left click in the header of the ledger.
5. Uncheck "Use Default" and change the sort arrow for "Post Date" from down to up.
4. Note that the balance provided after the most recent transaction has now changed.

OBSERVED RESULT

The Balance provided in the ledger appears to be calculated from the top down regardless of the sort direction of the transactions.  This results in an incorrect balance on the most recent transaction

EXPECTED RESULT

The balance after any given transaction should not change, regardless of the sorting order of the ledger.

SOFTWARE/OS VERSIONS
Windows: Not Confirmed
macOS: Not Confirmed
Linux/KDE Plasma:  Fedora 37 KDE Spin
(available in About System)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Micha Novak 2022-12-10 18:11:18 UTC
Created attachment 154484 [details]
Screenshot showing the broken behavior
Comment 2 Micha Novak 2022-12-10 18:11:39 UTC
Created attachment 154485 [details]
Screenshot of the default behavior