Bug 373550 - Display the sum of sub-categories when category is expanded
Summary: Display the sum of sub-categories when category is expanded
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 388152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-12 00:56 UTC by r.rijal
Modified: 2017-12-23 09:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
postings made for illustration (34.06 KB, image/png)
2017-01-10 22:31 UTC, mahueb55
Details
collapsed view (21.89 KB, image/png)
2017-01-10 22:31 UTC, mahueb55
Details
expanded view (29.39 KB, image/png)
2017-01-10 22:31 UTC, mahueb55
Details

Note You need to log in before you can comment on or make changes to this bug.
Description r.rijal 2016-12-12 00:56:15 UTC
Not a bug, but a feature ? 

The amount shown in category view is 0.00 and not the sum of its sub-categories when expanded. Always show the 'Sum' of sub-categories in Bold (like Income/Expense) ?
Comment 1 Thomas Baumgart 2016-12-12 08:15:11 UTC
This will have side effects, as you can assign splits to that category.

When expanded, the amount of each account itself is displayed, when collapsed, the sum of all accounts is displayed.

Your request will brake this functionality.
Comment 2 Jack 2016-12-12 15:58:42 UTC
I have not actually looked at the report recently - but could the cumulative total be displayed differently - for example [Including all subcategories: $234.54] where I mean for that text and brackets to be displayed.  That way you can see both per category and rolled up at the same time, but be sure which is which.
Comment 3 mahueb55 2017-01-10 22:31:03 UTC
One way to tackle this could be to display  posted amounts ("directly assigned splits") and calculated totals in different columns (please see attached screenshots). That way, the toggling for the totals is not required anymore, as both figures are visible at once. Would change existing look & feel though...

I can submit a patch/review request for that kind of behavior, if wanted/required.
Comment 4 mahueb55 2017-01-10 22:31:27 UTC
Created attachment 103334 [details]
postings made for illustration
Comment 5 mahueb55 2017-01-10 22:31:40 UTC
Created attachment 103335 [details]
collapsed view
Comment 6 mahueb55 2017-01-10 22:31:53 UTC
Created attachment 103336 [details]
expanded view
Comment 7 Thomas Baumgart 2017-01-14 10:33:31 UTC
Please feel free to provide a patch on https://git.reviewboard.kde.org/ against the KMyMoney master branch (KF5 version).  4.8 is frozen for new features.
Comment 8 mahueb55 2017-01-18 21:03:45 UTC
just did. Review request no. is #129852.
Comment 9 Albert Astals Cid 2017-01-21 00:07:42 UTC
Git commit 31f8fff27a58badfad3cc1a6e804df5c59e09421 by Albert Astals Cid, on behalf of Marc Hübner.
Committed on 21/01/2017 at 00:07.
Pushed by aacid into branch 'master'.

Display the sum of sub-categories when category is expanded

Adds a new column to the categories view. The (previously existing) "total" column does now always hold the summed value (no matter whether a subtotal position is expanded or collapsed). The new "posted amount" column only holds the value that was assigned to the category directly (that is, without subcategories).
REVIEW: 129852

M  +12   -2    kmymoney/models/accountsmodel.cpp
M  +1    -0    kmymoney/models/accountsmodel.h

https://commits.kde.org/kmymoney/31f8fff27a58badfad3cc1a6e804df5c59e09421
Comment 10 Thomas Baumgart 2017-12-23 09:22:13 UTC
*** Bug 388152 has been marked as a duplicate of this bug. ***