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 542768 - Faster entry of account in register window
Faster entry of account in register window
Status: RESOLVED DUPLICATE of bug 144669
Product: GnuCash
Classification: Other
Component: Register
2.2.x
Other Windows
: Normal enhancement
: ---
Assigned To: David Hampton
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2008-07-13 12:20 UTC by Allan Chandler
Modified: 2018-06-29 22:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allan Chandler 2008-07-13 12:20:40 UTC
I've finally got my wife (a chartered accountant) to use GnuCash instead of MYOB for her sideline business and there's one thing she really misses from the big accounting systems.

It would be nice to be able to enter the account number (such as 801) rather than the full text (such as Assets:Current Assets:801 Cash at bank chq acct 999999) or even the abbreviated as:cu:801.

Apparently, real accountants know their account numbers as well as we geeks know pi to several hundred significant digits and she says it's quite fast when you restrict the entry to numerics.

The code's obviously already there to search based on the text - what sort of effort would be involved to look up the account number (set when creating the chart of accounts, the one that dictates the order in which accounts are printed on reports, I think)?

Cheers,
Pax.
Comment 1 Allan Chandler 2008-07-14 04:19:24 UTC
In engine/Account.c, we could create gnc_account_lookup_by_code(const Account *parent,const char *code) based on gnc_account_lookup_by_full_name(const Account *parent,const char *name).  This new function would search for accounts using the account code, using xaccAccountGetCode(const Account *acc) on each account and child account until it finds a match (or exhausts the possibilities).

Then, in business/business-ledger/gncEntryLedger.c, the function gnc_entry_ledger_get_account_by_name(GncEntryLedger *ledger,BasicCell * bcell,const char *name, gboolean *new) could be modified near the start as follows:
../* Find the account */
..account = gnc_account_lookup_by_full_name(gnc_get_current_root_account(),name);
../* New stuff start */
..if (!account) {
....account = gnc_account_lookup_by_code(gnc_get_current_root_account(),name);
..}
../* New stuff end */
..if (!account) {

I'm thinking of actually trying this out but I need to see first how hard it is to build gnucash for Windows first.
Comment 2 Allan Chandler 2008-07-15 05:10:16 UTC
WTF?? :-)

I just spent the better part of two days building the Windows version to see if I could make this change and thought I'd check the behaviour of entering account code in the transfer field.

Lo and behold, the software already does this !!

Someone's already hot on the heels of this enhancement since the code matches closely what I'd suggested and it's not in the 2.2.5 source.  It's been placed in register/ledger-core/split-register.c presumably because the implementor knows more than me about the internal structure of the code.

Since someone's already on this, I'll defer to their judgement and not continue the work. Please keep us notified (via this bug request) on the progress.

Cheers,
Pax.
Comment 3 Allan Chandler 2008-07-15 05:19:21 UTC
Apologies, just checked SVN source and noticed this was done in r17253 as part of bug # 144669.

Closing as duplicate.


*** This bug has been marked as a duplicate of 144669 ***
Comment 4 John Ralls 2018-06-29 22:07:32 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=542768. Please update any external references or bookmarks.