Unbalanced balance sheet, "Trading Gains", #537476

Phil Longstaff plongstaff at rogers.com
Mon Nov 30 18:38:23 EST 2009


On Mon, 2009-11-30 at 18:09 -0500, Mike Alexander wrote:
> --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.

I'm ready to release 2.3.8 any time.  Please let me know as soon as you
can whether you want me to hold off releasing it for you or if you think
the fixes will be more extensive.

Phil



More information about the gnucash-user mailing list