GNOME Bugzilla – Bug 129099
Register: Show leaf names instead of full names
Last modified: 2018-06-29 20:39:41 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
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!
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.
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.
Sad to see that this very important feature (specify account by number) has still not arrived four years after the original request :-(
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
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!
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.
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.
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 :-)
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).
(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
*** Bug 478470 has been marked as a duplicate of this bug. ***
*** Bug 489285 has been marked as a duplicate of this bug. ***
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!
Rolf, please DO NOT use the attachment status field yourself for accepting patches! See comment 9 as well.
Created attachment 114402 [details] [review] Try to avoid memory leaks Memory leaks described in #9 should be fixed in this patch. Please check.
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!
works nicely, absolutely great. Hope to see it in trunk soon.
Applied to trunk as r17324, with only really minor modifications. Thanks a dozen!
Great! Thanks a lot, guys!
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.