Getting the sign of a gnc-monetary
Chris Dennis
cgdennis at btinternet.com
Mon Apr 27 19:26:47 EDT 2009
Pop quiz:
Is there a better way of finding the sign of a gnc-monetary
amount/commodity pair than this?
(define (pair-neg? pair)
(< (gnc:gnc-numeric-num (gnc:gnc-monetary-amount pair)) 0))
It seems cumbersome, but I can't find anything better.
Should there be a (gnc:gnc-monetary-neg?) predicate in gnc-numeric.scm?
And/or (gnc:gnc-numeric-neg?) ?
Just something I thought of while trying to make an eguile-based balance
sheet with negative values in red.
cheers
Chris
--
Chris Dennis cgdennis at btinternet.com
Fordingbridge, Hampshire, UK
More information about the gnucash-user
mailing list