GNOME Bugzilla – Bug 459493
"Cleared" column in account overview doesn't sum up values of sub-accounts
Last modified: 2018-06-29 21:43:54 UTC
Please describe the problem: In an account hierarchy where account A is a place-holder and accounts B and C are sub-accounts of A the cleared sums of B and C are not added up and shown as a sum in the "Cleared" column of account A. Instead the value 0 is shown. This behaviour is different from the "Total" column which nicely adds up all totals of sub-accounts and shows it in the parents account "Total" column. Steps to reproduce: 1. Enable the "Cleared" column in the account overview using the downward arrow button in the overviews header 2. Create a place-holder account and at least one sub-account to that account 3. Enter a transaction into the sub-account and clear/reconcile that transaction 4. Observe that the sub-account shows the correct value of cleared values in the "Cleared" column whereas the parent-account still shows 0. 5. Observe that this behaviour is different from the "Total" column Actual results: See reproduction steps 4 and 5 Expected results: I would expect the "Cleared" column of the parent-account to show the total sum of all cleared transactions of its sub-accounts and not 0. I would thus expect the same behaviour as that of the "Total" column [apart from that one showing total totals and not cleared totals ;)] Does this happen every time? Yes Other information: It appears that the "Present", "Reconciled" and other columns show the same effect of not adding up the sub-accounts totals and always showing 0.
Created attachment 93205 [details] gnucash datafile useable to reproduce the bug
Created attachment 93206 [details] Screenshot of the bug as reproduced by the attached data file
I've created a datafile and a screenshot of who the account overview of that example file is shown to me. I'd expect the "Present" column of Account A to show 200 instead of 0, the "Cleared" column should also show 200 and the "Reconciled" column should show 100 Euro.
I don't have a cleared column here. Is that still a problem for you with the latest gnucash?
This behavior seems to have been desired by the developers originally. The fix is very simple. I will include a patch. I would recommend that this be included in trunk. My reason being that if you like to keep track of different "virtual" accounts within one bank account, it is nice to see the cleared balance for the whole bank account.
Created attachment 125902 [details] [review] Patch to add requested enhancement
(In reply to comment #5) > This behavior seems to have been desired by the developers originally. The fix > is very simple. I will include a patch. I would recommend that this be > included in trunk. My reason being that if you like to keep track of different > "virtual" accounts within one bank account, it is nice to see the cleared > balance for the whole bank account. > Edit: The original behavior without children accounts included in the Cleared total seems to have been desired by the developers originally.
Thanks for the patch. However, I'm not quite convinced which way of balance viewing is better than the other. Any arguments which make the new way strikingly better than the old?
(In reply to comment #8) > Any arguments which make the new way > strikingly better than the old? Well my argument would be that the behaviour of the "Cleared", "Present", "Reconciled" and other columns is in stark contrast to that of the "Total" column. In comment #7 it has been mentioned that this different behaviour was desired by the developers, but I cannot make up any reason for the behaviour as it is. Please help ;) For example, when checking my assets-account which are seperated into many sub-accounts, I can see in the total column the total amount of assets in all sub-accounts neatly summed up. Unfortunately this also includes future transactions but I'd like to see my total assets as of today ("Present" column) or those I have cleared ("Cleared" column). However, those show nothing -> 0. In my judgement there shouldn't be a search for arguments making the "new way" strikingly better, instead one should ask oneself why "the old way" does it differently for different columns. In short: why have any difference in the behaviour of the "Total" column on the one hand and the "Present", "Cleared", etc. columns on the other hand?
Christian, The reason that I desired this behavior is because I have bank account under which I must keep track of two different virtual accounts. The sources of income and expenses for each virtual account must be recorded separately so that I can keep each virtual account balanced. I think the strongest argument for having the cleared column summed is that this behavior may be useful to some people, while not having the cleared column summed isn't useful for anyone. Jens, If you would like to have the other columns summed as well, it is as easy as changing the third argument in gnc_ui_account_get_print_balance to TRUE in gnome-utils/gnc-tree-model-account.c. For example for Present, you would look for something like GNC_TREE_MODEL_ACCOUNT_COL_PRESENT and then change the FALSE to TRUE in the get balance function following. Cheers, Chad
I think that the summed behaviour is useful when using placeholder accounts. I am not sure what's going to happen for non-placeholder accounts having child accounts.
See also Bug #459493 . The problem is the same.
*** Bug 568652 has been marked as a duplicate of this bug. ***
Committed to trunk, r17848. Should this have been back-ported as well? Probably yes?
*** Bug 571893 has been marked as a duplicate of this bug. ***
Was this backported? If so, it should be resolved with target milestone 2.2.9. If not, it should be resolved with target milestone 2.3.0.
COL_CLEARED doesn't include recursive values, so I'm marking it resolved in 2.3.0
(In reply to comment #6) > Created an attachment (id=125902) [edit] > Patch to add requested enhancement Can this patch be used in 2.3.3? I cant find the file "gnc-tree-model-account.c" Thanks
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=459493. Please update any external references or bookmarks.