Are we ready for the 2.0.0 release in mid-May?

Mike Alexander mta at umich.edu
Sat Apr 29 18:22:40 EDT 2006


--On April 28, 2006 5:12:18 PM -0400 David Hampton 
<hampton-gnucash at rainbolthampton.net> wrote:

>> What about lots?  I've been playing around with them a bit and they
>> don't really seem ready for use.  They are effectively disabled
>> right  now because of the bug I mentioned in
>> <https://lists.gnucash.org/pipermail/gnucash-devel/2006-April/017154
>> .html>.  I didn't put this in bugzilla but if it is something that
>> people think  should be worked on now I will.  If this bug is fixed
>> lots work better  but not well enough to be used effectively.
>
> I committed this today.

Thanks for committing this.  Sorry about not putting it in bugzilla. 
I'll transfer this there if you think it would be useful.

I see that you changed the code in gnc_lot_get_balance_before.  It's 
looking for all splits before the one given and in my version it 
considered the gains source split if given a gains split.  This is 
important.  My first version was like the one you committed but it 
didn't work if you had two disposals of the same stock on the same day. 
The gains splits are put in a separate transaction by the capital gain 
scrubbing code, and the transaction sorting code may sort gains splits 
after other splits on the same day (and did in my case).  This meant 
that the second disposal on the same day didn't work right since the 
capital gains from the first disposal weren't considered in calculating 
the basis for the second disposal.  I should have added some comments 
documenting why I did this.

I've attached a patch the shows what I'm talking about.  It also 
patches cap-gains.[ch] to define the xaccSplitGetGainsSourceSplit 
method used to find the source split associated with a capital gains 
split.  There are some other changes in the cap-gains.[ch] patch which 
might be worth considering.  They are mostly to more consistently use 
lot_amount and lot_value rather than opening_amount and opening_value.

-- 
Mike Alexander           mta at umich.edu
Ann Arbor, MI            PGP key ID: BEA343A6


-------------- next part --------------
A non-text attachment was scrubbed...
Name: CapGains3.patch
Type: application/octet-stream
Size: 7491 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060429/72ed8d5d/CapGains3.obj


More information about the gnucash-devel mailing list