How to get tax table value for invoice report?

Valdis Vītoliņš valdis.vitolins at odo.lv
Mon May 24 12:23:17 EDT 2010


I need to get name of Tax table name (because I have tax value in name)
http://code.gnucash.org/docs/HEAD/structGncTaxTable.html
Or better should be concatenated tax table name, entry amount and type
(e.g. VAT 21%, or VAT 10%)
http://code.gnucash.org/docs/HEAD/structGncTaxTableEntry.html

Usually we don't need to sum different tax table entries in one general
tax, so dealing with
several entries is hypothetical case and is important only for
localizations.

(Or, if I could choose which entry to use from several, I could define
one tax table "VAT" with entries 0%, 10%, 21%)

Valdis


> 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