Printing tax table name in invoice.scm

Derek Atkins warlord at MIT.EDU
Mon Mar 26 05:33:16 EDT 2007


Hi,

Bill Keegan <billk at umpire.dhs.org> writes:

> I'm using gnucash 1.8.9. I'd like to print the tax table name for the 
> tax table applied per line item. The most successful result has been from
>
>>     (if (taxtable-col column-vector)
>>  (addto! row-contents
>>     (gnc:entry-get-inv-tax-table entry)))
>
> resulting in "#[unknown]" (less the quotes) in the new column I've 
> added. Any advise as well as were I can find the answer would be 
> appreciated.

Well, first, this will only work on Customer invoices, not
Vendor Bills or Employee Expenses.   Second, this returns the
taxtable, not the NAME of the taxtable.  Third, you would need
to set up the column (which you dont show in this code snippet).

The "#[unknown]" probably means that it doesn't know how to
print out the reference to the taxtable.  Right now the
gncTaxTableGetName() isn't wrapped, so you wont be able to
use that API until the 2.2 swigification (which probably wraps
it by default).

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list