PATCH: handle "0" amount (was Re: stock thoughts)

Jon Lapham lapham at extracta.com.br
Wed Jul 30 23:24:14 CDT 2003


Derek Atkins wrote:
> Jon Lapham <lapham at extracta.com.br> writes:
> 
> 
>>Compiling now, I'll let you know how it deals with my stocks example
>>file.  But check this out:
> 
> 
> Thanks.  At least someone else playing with it for 15-30 minutes
> and trying to get it to "do the wrong thing" would be useful.
> 
> 
>>lapham at bilbo > patch -p0 < ../../../ledger-accept-0.diff
>>patching file src/engine/Transaction.c
>>Hunk #1 succeeded at 2987 (offset -161 lines).
>>patching file src/register/ledger-core/split-register-control.c
>>Hunk #1 succeeded at 1078 (offset 1 line).
>>patching file src/register/ledger-core/split-register-model-save.c
>>patching file src/register/ledger-core/split-register-model.c
>>Hunk #1 succeeded at 928 (offset -30 lines).
>>Hunk #3 succeeded at 1377 (offset -30 lines).
>>patching file src/register/ledger-core/split-register.c
>>Hunk #1 succeeded at 1632 (offset -98 lines).
>>
>>Was this patch against an uptodate 1.8 branch?
> 
> 
> The patch was created against CVS HEAD, but I verified it applied to
> 1.8 (albeit with these warnings) before sending it out.  Sorry, I
> should have mentioned that.

No problem.  Running fine here.  I updated the investment docs with your 
previously impossible suggestions. :)  I'm not happy with my explanation 
in paragraph 2... if you have any suggestions.

http://www.jandr.org/temp/gnucashdocs/invest_sell1.html

One thing I do not understand.  Take a look at the screenshot on the 
above web page (you may need to refresh your browser's cache).

There are 2 transactions listed as "Sell stock for profit" derived from 
the same split transaction.  No problem, I get that.  The first one 
(with the closed split in the screenshot) has a Tot Sell of 3000. 
Great, I see where that comes from.  But, what does the Tot Sell of 100 
for the second part (top line of the opened split in the screenshot) of 
the split come from?

Also, what does the "1" mean on the last line of the split?  In the 
"share price" column.

-- 
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
  Jon Lapham  <lapham at extracta.com.br>          Rio de Janeiro, Brasil
  Work: Extracta Moléculas Naturais SA     http://www.extracta.com.br/
  Web: http://www.jandr.org/
***-*--*----*-------*------------*--------------------*---------------




More information about the gnucash-devel mailing list