Unbalanced balance sheet, "Trading Gains", #537476

Mike Alexander mta at umich.edu
Mon Nov 30 18:09:21 EST 2009


--On November 30, 2009 3:25:06 PM -0500 Forest Bond 
<forest at alittletooquiet.net> wrote:

> Hi,
>
> On Mon, Nov 30, 2009 at 01:13:14PM -0500, Forest Bond wrote:
>> > It should  be impossible to get a "Trading Gains" or "Trading
>> > Losses" line in the  balance sheet report unless you have at least
>> > one trading account.
>
> I snooped around a little in balance_sheet.scm.  Here's what I know:
>
> * trading-accounts is an empty list.
> * neg-trading-balance is non-zero.
>
> That means that this expression:
>
> (gnc:accountlist-get-comm-balance-at-date trading-accounts date-tp)
>
> Is returning a non-zero commodity collector.  Is it possible that
> gnc:accountlist-get-comm-balance-at-date incorrectly handles an empty
> account list?  That's what it looks like to me, but it seems like
> that would break a lot of reports, right?
>
> I don't know the code well enough to see what could cause that
> problem.

Thanks for doing the research to isolate the problem.  I think I know 
what's causing it and should have a fix later tonight or tomorrow.

           Mike



More information about the gnucash-user mailing list