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 129099 - Register: Show leaf names instead of full names
Register: Show leaf names instead of full names
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: David Hampton
Chris Shoemaker
: 478470 489285 (view as bug list)
Depends on:
Blocks: 473506 510660
 
 
Reported: 2003-12-11 15:50 UTC by r.sikau
Modified: 2018-06-29 20:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch appended (23.10 KB, patch)
2008-05-05 19:41 UTC, C.Ernst
needs-work Details | Review
Replacement with property default = FALSE (23.39 KB, patch)
2008-05-06 14:30 UTC, C.Ernst
none Details | Review
Same as before based on the current head revison. (22.09 KB, patch)
2008-07-08 15:01 UTC, C.Ernst
needs-work Details | Review
console output from segfaulting gnucash (3.29 KB, text/plain)
2008-07-09 08:09 UTC, Rolf Leggewie
  Details
Try to avoid memory leaks (21.99 KB, patch)
2008-07-11 16:19 UTC, C.Ernst
committed Details | Review

Description r.sikau 2003-12-11 15:50:34 UTC
When you use an account structure as expected in professional German book
keeping you end up having entries in the account list of the transfer field
like this:
"8. sonstige betriebliche Aufwendungen:Andere betriebl. Aufwendungen:04655
  Nicht abzugsfähige Bewirtungskosten".
Everything before "04655..." are placeholders (and defined as such) and
only the "04655..." part is the relevant account.

So, I urgently suggest to introduce an option under preferences whether or
not to ignore placeholder accounts in these listings. If selected true, the
result should be that only the bookable account part is listed
alphabetically without any placeholders before.

For a better understanding keep in mind that a book keeper knows the
numeric code and the name of an account, and he addresses the one or the
other. The whole structure around is necessary for balances and such but
not for entering transactions.

Regards,

Ralph
Comment 1 Luis Villa 2003-12-30 00:05:40 UTC
Deleting the PLEASEFIX keyword everywhere. All bugs are implicitly a 'please
fix'. :) If more specifity is needed, use the target milestone feature in
bugzilla. Ask bugmaster@ if you have any questions about this. Thanks!
Comment 2 Andreas Schenk 2005-01-27 21:04:27 UTC
This message is old and probably forgotten? Since at least I am very 
interested to get these features implemented I add this remark. As far as I 
understand this message, two features are required: 
 
(1) The only thing a bookkeeper needs is the account number and the account 
name. Only these two things should be displayed. 
 
(2) In larger tables of accounts (a couple of thousand accounts, which is 
still not much)an account tree makes sence only to structure the table, in 
order to make it easier to find an account. The statement that some accounts 
contain other accounts has - to my knowledge - no practical relevance.  
 
A hierarchy of accounts is defined to evaluate the balance sheet, but this 
data structure is more complicated, than the one in gnucash: For a large 
number of accounts, this tree structure depends on the sign of the account 
balances, which can be positive or negative.  
 
Thus, one hase to distinguish two hierarchies: 
 
(a) A static (possibely treelike) structure of an account table. Only the 
leaves are accounts. The other nodes are only entities to structure the table. 
Thus, only the leaves should be bookable accounts. 
 
(b) The hierarchy for the balance sheet, which is dynamic, depending on the 
signs of a some of the account balances. This hierarchy should be stored in a 
different data structure. It need also the information about the "dynamic" 
parts. 
 
I would be happy to get (1) first. (2) seems to be more complicated. 
Comment 3 Christian Stimming 2005-06-27 09:25:58 UTC
As far as I can see this is a "very German accountant thing". Just for the
record: The account hierarchy that is mentioned here usually includes the
account code (number) in the account's name, because the code is the more
important thing.

Ok, here are the distinct features that are asked for:

1. The account display in the account register should show only the leaf
account's name and not the fully qualified name of the account, including
"path". That is probably the easiest option to add somewhere to the preference.
You can easily achieve this by replacing the function call
xaccAccountGetFullName (1.8 terminology) in the src/register/ledger-core
directory   by xaccAccountGetName. Maybe some of you users could try this?

2. When entering an account in the register, the accountants would like to enter
the account also by its code, which happens to be the start of the account name
as well. This can be achieved by replacing the same as above, in
src/gnome-utils/account-quickfill.c

3. The question of hierarchy and the balance sheet, however, is quite orthogonal
to this issue. There was a lengthy discussion in German on gnucash-de in
Feb/Mar'05, please review that first. In short, the balance sheet can be
implemented to use other means of grouping the accounts, even without internal
changes to gnucash. Nevertheless someone would have to write a new balance sheet
report for this. That should be discussed elsewhere, either in a new RFE or on
the mailing lists.
Comment 4 Rolf Leggewie 2007-11-20 12:45:40 UTC
Sad to see that this very important feature (specify account by number) has still not arrived four years after the original request :-(
Comment 5 C.Ernst 2008-05-05 19:41:38 UTC
Created attachment 110423 [details] [review]
Patch appended

Solution similar to Christian Stimmigs sketch:
- Introduce new property show_full_account_names to the schema general/register to toggle between full account path and leaf name
- Configuration in Preferences dialog  ("Register Defaults")
- Convenience functions gnc_get_account_name_for_register() and gnc_account_lookup_for_register() return the proper values depending on the configurations.
- Ledgers and registers use the new functions for displaying account names (applies also to business-ledger)
- account-quickfill uses gnc_get_account_name_for_register() and listens to gconf property
Comment 6 Derek Atkins 2008-05-05 20:08:52 UTC
Christoph,

Remember that non-existent preferences default to "false", and there's no way to differentiate between "schema doesn't exist" and "schema exists and value is false".  This means that all boolean preferences that get added to the system should have a default value of galse.  So... you should make sure that the 'default', which is the current behavior, is "false", which means you should change it from "show full account path" to "show only leaf account names".

Also, why is there so much movement in the preferences.glade?

As for comment #4, this feature is not at all important to any of us in the USA.  So it's not sad at all.  The only sadness here is that there aren't more german engineers willing to spend their time working on features that only apply to germans.  You can thank Christoph for doing this work!
Comment 7 C.Ernst 2008-05-06 14:30:40 UTC
Created attachment 110462 [details] [review]
Replacement with property default = FALSE

Like before, but the new property is called show_leaf_account_names and defaults to FALSE, according to the advice of Derek.

Concerning the movements in preferences.glade: I just sorted the widgets in their order of appearance in the dialog. I found it difficult to insert a new line and move the other widgets, because they were quite unsorted. There is no other modification. If you insist on having the previous order, I will restore the unsorted revision and just append the new property.
Comment 8 C.Ernst 2008-07-08 15:01:57 UTC
Created attachment 114184 [details] [review]
Same as before based on the current head revison.

Replacement based on the current head revison to avoid merge conflicts.
Comment 9 Andreas Köhler 2008-07-08 19:09:15 UTC
If you treat the return value of xaccAccountGetFullName() like the one of xaccAccountGetName() as (const char *), then you leak it.  Not good!  Can you g_strdup() the name instead and readd the g_frees, please?  Thanks :-)
Comment 10 Rolf Leggewie 2008-07-09 08:09:03 UTC
Created attachment 114233 [details]
console output from segfaulting gnucash

Thank you for the updated patch.  I applied it on top of r17286 and gc starts up fine at first (tip of the day is shown, plus a warning about some incompatibilities in my custom reports).  At last, the program segfaults.  It could very well be, this has nothing to do with the patch, but I tought, I'd mention it here.  I'll try and recompile r17286 without the patch to see if the segfault occurs there as well (in that case, I'll open a new bug report to keep down the clutter here).
Comment 11 Rolf Leggewie 2008-07-09 13:18:26 UTC
(In reply to comment #10)
> I'll try and recompile r17286 without the patch to see if the
> segfault occurs there as well

this occurs from plain trunk 17286 as well and is reported in bug 542211
Comment 12 Rolf Leggewie 2008-07-10 12:17:36 UTC
*** Bug 478470 has been marked as a duplicate of this bug. ***
Comment 13 Rolf Leggewie 2008-07-10 12:21:58 UTC
*** Bug 489285 has been marked as a duplicate of this bug. ***
Comment 14 Rolf Leggewie 2008-07-10 12:27:26 UTC
Comment on attachment 114233 [details]
console output from segfaulting gnucash

OK, here is what the patch and does not do for me

* I can enter accounts by their leaf names after the box (which only
  talks about displaying stuff!) is ticked.  Quickfill works fine.
* the pull-down in the ledger becomes a flat hierarchy
* I cannot get a flat hierarchy to display the chart of accounts
  (was that even intended or did I misunderstand things here?)

My vote goes for letting it in.  Thanks a bundle!
Comment 15 Andreas Köhler 2008-07-10 13:47:30 UTC
Rolf, please DO NOT use the attachment status field yourself for accepting patches!
See comment 9 as well.
Comment 16 C.Ernst 2008-07-11 16:19:57 UTC
Created attachment 114402 [details] [review]
Try to avoid memory leaks

Memory leaks described in #9 should be fixed in this patch.
Please check.
Comment 17 Rolf Leggewie 2008-07-11 19:53:32 UTC
Comment on attachment 114402 [details] [review]
Try to avoid memory leaks

>+++ AUTHORS	(Arbeitskopie)
[...]
>+Christoph Ernst <C.Ernst72@googlemail.com> Small bugfixes and minor enhancements

that is certainly incorrect.  These are some very major additions a lot of people have been anticipating for years!
Comment 18 Rolf Leggewie 2008-07-12 00:49:47 UTC
works nicely, absolutely great.  Hope to see it in trunk soon.
Comment 19 Andreas Köhler 2008-07-13 21:30:39 UTC
Applied to trunk as r17324, with only really minor modifications.
Thanks a dozen!
Comment 20 Rolf Leggewie 2008-07-14 11:49:47 UTC
Great!

Thanks a lot, guys!
Comment 21 John Ralls 2018-06-29 20:39:41 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=129099. Please update any external references or bookmarks.