Problems testing the sign of a commodity collector.
Michael McKay
michael.mckay at sympatico.ca
Sun Jan 25 19:32:43 EST 2009
I'm having problems testing the sign of a commodity collector.
I've modified the income statement to show gross margin and EBITDA. I've
removed the option for multiple columns and put all the results in a single
table. It all works well except for the following:
The original scm code used this:
(report-line
(if standard-order?
exp-table
inc-table)
(string-append (_ "Net income") period-for)
(string-append (_ "Net loss") period-for)
net-income
(* 2 (- tree-depth 1)) exchange-fn #f #f
)
I'd like to replace it with:
(add-subtotal-line my-table
(if (gnc-numeric-negative-p (net-income))
(string-append (_ "Net loss") period-for)
(string-append (_ "Net income") period-for)
)
#f net-income)
Net-income is defined as
(set! net-income (gnc:make-commodity-collector))
Everything works but the if statement. What am I missing?
Thanks in advance.
Michael McKay
Web site: http://mjmhelp.com
Web log: http://mjmhelp.com/blog
Subscribe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael J McKay CD MBA.vcf
Type: text/x-vcard
Size: 4484 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20090125/c83d1570/attachment.vcf
More information about the gnucash-devel
mailing list