> > An update on the failed comaprison to zero. Once the error was pointed out th
> e
> > 'fix' was simple:
> >
> > change the comparison of '=' to 0.00 to '<'' 0.001. Thus the if clause now
> > reads:
> >
> > (if (< (gnc:account-get-balance-at-date acct date #t) 0.001)
> >
> > Works as expected now. If other currencies have more decimal places, just
> > increase the number of decimal places to one more than the currency used and
> > the test should work as desired.
>
> I suspect that you may want to toss in an (abs ) somewhere, lest the value
> be -0.00001, and this be seen as off in the wrong direction...
> --
For my purposes that isn't necessary - the accounts I use the report on are
only asset accounts - which I work very hard to keep positive.
One slight correction - drop one zero after the decimal point. The test should
be for the smallest currency unit, not 1/10 of that. Shows what happens when
you think of the solution just before going to bed and then have to wait 20
hours to implement it.
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]