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 420543 - Allow creation of new lots from lot viewer.
Allow creation of new lots from lot viewer.
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
git-master
Other Linux
: Normal enhancement
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2007-03-20 14:14 UTC by Klee Dienes
Modified: 2018-06-29 21:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implements support for adding lots in the lot viewer. (11.41 KB, patch)
2007-03-20 14:16 UTC, Klee Dienes
none Details | Review

Description Klee Dienes 2007-03-20 14:14:38 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.
Comment 1 Klee Dienes 2007-03-20 14:15:14 UTC
I'll be submitting another patch shortly to allow the user to assign specific transactions to specific lots.
Comment 2 Klee Dienes 2007-03-20 14:16:52 UTC
Created attachment 84975 [details] [review]
Implements support for adding lots in the lot viewer.
Comment 3 Jakub Tesinsky 2007-10-27 10:41:39 UTC
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

Comment 4 Derek Atkins 2007-12-26 02:15:15 UTC
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.
Comment 5 John Ralls 2018-06-29 21:30:17 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=420543. Please update any external references or bookmarks.