How to get tax table value for invoice report?

Valdis Vītoliņš valdis.vitolins at odo.lv
Tue May 25 04:40:28 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
> > 
> 
> If you change the line at about line 212 in invoice.scm 
> (_ "T") "")))
> to 
> (_ (gncTaxTableGetName (gncEntryGetInvTaxTable entry))) "")))

Yep. That works, and generally is enough. Though I use little bit
different code 

    (if (tax-col column-vector)
	(addto! row-contents
		(gnc:make-html-table-cell/markup
		 "text-cell"
                (gncTaxTableGetName (gncEntryGetInvTaxTable entry)) 
		)))

Valdis


More information about the gnucash-devel mailing list