How to get tax table value for invoice report?

Derek Atkins derek at ihtfp.com
Mon May 24 11:43:45 EDT 2010


Hi,

On Mon, May 24, 2010 11:29 am, Valdis Vītoliņš wrote:
> Hello!
> I'm studying Bill/Invoice reports, and I investigate how for Fancy
> invoice
> (fancy-invoice.scm) include field with Tax Table value (not simple T, if
> it is taxed).

What exactly do you mean by "Tax Table Value"?

> Currently I use
> ...
>     (if (tax-col column-vector)
> 	(addto! row-contents
> 		(gnc:make-html-table-cell/markup
> 		 "number-cell"
> 		 (and (gncEntryGetBillTaxable entry) (gncEntryGetInvTaxTable
> entry)))))
> ..
> But it shows:
> #[unknown]
> in report without any warnings/errors in the log.

Right, because you're getting the Tax Table object, which could contain
multiple Tax Table Entries.  Do you just want to print the Tax Table Name?
 If you want to print the percentage, well, there could be multiple
numbers.

> Any ideas/directions (including API description, where I could look to
> know how to invoke it) are welcomed.

Use a text cell instead of number cell and use gncTaxTableGetName?

for API reference:   http://code.gnucash.org/docs/HEAD/

> Thanks in advance,
> Valdis

-derek



More information about the gnucash-devel mailing list