After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 459493 - "Cleared" column in account overview doesn't sum up values of sub-accounts
"Cleared" column in account overview doesn't sum up values of sub-accounts
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
2.2.x
Other All
: Normal minor
: ---
Assigned To: David Hampton
Chris Shoemaker
: 568652 571893 (view as bug list)
Depends on:
Blocks: backport
 
 
Reported: 2007-07-23 10:59 UTC by Jens Seiler
Modified: 2018-06-29 21:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnucash datafile useable to reproduce the bug (8.12 KB, application/octet-stream)
2007-08-07 12:37 UTC, Jens Seiler
  Details
Screenshot of the bug as reproduced by the attached data file (8.01 KB, image/png)
2007-08-07 12:37 UTC, Jens Seiler
  Details
Patch to add requested enhancement (1.20 KB, patch)
2009-01-07 05:50 UTC, Chad Voegele
committed Details | Review

Description Jens Seiler 2007-07-23 10:59:58 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.
Comment 1 Jens Seiler 2007-08-07 12:37:11 UTC
Created attachment 93205 [details]
gnucash datafile useable to reproduce the bug
Comment 2 Jens Seiler 2007-08-07 12:37:56 UTC
Created attachment 93206 [details]
Screenshot of the bug as reproduced by the attached data file
Comment 3 Jens Seiler 2007-08-07 12:40:38 UTC
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.
Comment 4 Rolf Leggewie 2008-07-03 14:25:17 UTC
I don't have a cleared column here.  Is that still a problem for you with the latest gnucash?
Comment 5 Chad Voegele 2009-01-07 05:49:34 UTC
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.
Comment 6 Chad Voegele 2009-01-07 05:50:38 UTC
Created attachment 125902 [details] [review]
Patch to add requested enhancement
Comment 7 Chad Voegele 2009-01-07 05:56:56 UTC
(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.
Comment 8 Christian Stimming 2009-01-14 20:03:08 UTC
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?
Comment 9 Jens Seiler 2009-01-14 20:17:35 UTC
(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?



Comment 10 Chad Voegele 2009-01-14 21:49:06 UTC
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
Comment 11 alfonsname 2009-01-24 18:11:43 UTC
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.
Comment 12 alfonsname 2009-01-24 18:13:07 UTC
See also Bug #459493 . The problem is the same.
Comment 13 Christian Stimming 2009-01-28 20:53:42 UTC
*** Bug 568652 has been marked as a duplicate of this bug. ***
Comment 14 Christian Stimming 2009-01-28 20:56:10 UTC
Committed to trunk, r17848. Should this have been back-ported as well? Probably yes?
Comment 15 Phil Longstaff 2009-04-27 13:17:05 UTC
*** Bug 571893 has been marked as a duplicate of this bug. ***
Comment 16 Phil Longstaff 2009-05-01 12:18:33 UTC
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.
Comment 17 Phil Longstaff 2009-06-05 01:34:56 UTC
COL_CLEARED doesn't include recursive values, so I'm marking it resolved in 2.3.0
Comment 18 gferrise 2009-08-07 19:11:22 UTC
(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
Comment 19 John Ralls 2018-06-29 21:43:54 UTC
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.