GNOME Bugzilla – Bug 420543
Allow creation of new lots from lot viewer.
Last modified: 2018-06-29 21:30:17 UTC
The current lot viewer has only one way to create and manage tax lots, by using the scrubber and the default FIFO policy. This isn't always what the user wants. The attached patch allows the user to create new tax lots from the lot viewer. It also fixes a few minor bugs in the lot viewer that were preventing proper saving and updating of lots when they were modified from the viewer. 2007-03-18 Klee Dienes <klee@mit.edu> * src/engine/Account.c (xaccAccountRemoveLot): Generate a QOF_EVENT_ADD for the lot and QOF_EVENT_MODIFY for the account. (xaccAccountInsertLot): Ditto. * src/engine/gnc-lot.c (gnc_lot_make_default): Move from cap-gains.c. * src/engine/gnc-lot.h (gnc_lot_make_default): Add prototype. * src/engine/cap-gains.c (MakeDefaultLot): Move to gnc-lot.c as gnc_lot_make_default(). * src/gnome/lot-viewer.c: Add code to support lot creation: (RESPONSE_NEW_LOT): Add enumerated value. (lv_save_current_row): New function. (lv_select_row): Add call to lv_save_current_row. (lv_unselect_row): Use lv_save_current_row. (lv_close_handler): Use lv_save_current_row. (lv_response_cb): Handle RESPONSE_NEW_LOT. (gnc_lot_viewer_dialog): Watch for QOF_EVENT_ADD and QOF_EVENT_REMOVE for lots. * src/gnome/glade/lots.glade: Add "new lot" button.
I'll be submitting another patch shortly to allow the user to assign specific transactions to specific lots.
Created attachment 84975 [details] [review] Implements support for adding lots in the lot viewer.
The GUI FIFO algorithm often does not get it right, so there really should be possibility to perform at least there operations in GUI: * joining lots by hand * splitting lots by hand * moving split to different lot
Applied to trunk. I had to update the patch based on other updates. Thanks. I've also updated the signals to differentiate between ADD and REMOVE. r16725.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=420543. Please update any external references or bookmarks.