How to print VAT rates on the invoices

William Anderle william.anderle at gmail.com
Wed Feb 8 15:08:45 EST 2012


Hi Mike,
thanks for the prompt reply.

The code in my invoice.scm, easy-invoice.scm, fancy invoice.scm is 
slightly different than yours:

     (if (tax-col column-vector)
     (addto! row-contents
         (if (if invoice?
             (and (gncEntryGetInvTaxable entry)
                  (gncEntryGetInvTaxTable entry))
             (and (gncEntryGetBillTaxable entry)
                  (gncEntryGetBillTaxTable entry)))
             ;; Translators: This "T" is displayed in the taxable 
column, if this entry contains tax
             ;;(_ "T") "")))
             (_ (gncTaxTableGetName (gncEntryGetInvTaxTable entry))) "")))

Biggest difference is that (3rd line) I have "if invoice?", while you 
"if cust-doc?".
Said this, I replaced in all of the three files the above code with the 
below one:

     (if (tax-col column-vector)
     (addto! row-contents
         (if invoice?
             (gncTaxTableGetName (gncEntryGetInvTaxTable entry))
             (gncTaxTableGetName (gncEntryGetBillTaxTable entry))
         )
         ))

My early report is the following:
-Now both Invoices and Bills shows the VAT Rate;
-There is a little eye-candy bug, which I try to explain with the 
following to images.

Now, the Tax Rate column (in my language, named "Imponibile") is shown 
like this:
http://img580.imageshack.us/img580/3926/billactualprintwithtaxr.png

It would be good to format the Tax Rate column like all the others, by 
putting the text on the right;
moreover, if possible it would be nice to add the kind of VAT rate next 
to it (in my case, the % symbol), like shown in the image below.
http://img821.imageshack.us/img821/6289/billprintwithtaxratelik.png

I'll have to use GnuCash for a while,
I'll report you if I discover additional problems about this piece of code.

Best regards

William Anderle


Il 08/02/2012 18:53, Mike Evans ha scritto:
> On Wed, 08 Feb 2012 10:39:30 +0100
> William Anderle<william.anderle at gmail.com>  wrote:
>
>> Hello everybody
>> I'd need help with a function of GnuCash
>> Please not that I'm not a programmer, neither an accounting expert,
>> so excuse me if my terms aren't perfect.
>>
>> I'm trying testing GnuCash on a little Italian business, to see if it
>> could be a suitable accounting program.
>>
>> As far as I see, it lacks a very important function which my client
>> (and I suppose many others) absolutely needs:
>> the ability to print on the invoices the VAT rate applied on the
>> individual terms.
>>
>> I try to be more clear:
>> -when I insert the data into the invoices, I'm able to chose
>> different VAT rates (eg., 10% on manpower, 20% on goods and so on);
>> -when I print the invoice, the final sum is correct; however, the
>> print page rather than than the different VAT rates just shows a "T"
>> which means "taxable".
>> Please take a look at the image below to better understand what I
>> mean: http://img217.imageshack.us/img217/3516/gnucashproblem2.jpg
>>
>> Is it possibile to print the VAT rate rather than just a "T"?
>> If yes, how?
>>
>> Thanks to everyone for help.
>>
>> Best regards
>>
> William
> Try this.
> In invoice .scm, near line 210
>
> Comment with ;'s (as below) or delete this section
>
>   ;   (if (tax-col column-vector)
>   ;     (addto! row-contents
>   ;       (if
>   ;       (if cust-doc?
>   ;         (and (gncEntryGetInvTaxable entry)(gncEntryGetInvTaxTable entry))
>   ;         (and (gncEntryGetBillTaxable entry)(gncEntryGetBillTaxTable entry))
>   ;       )
>   ;           (gncTaxTableGetName (gncEntryGetInvTaxTable entry))
>   ;           (gncTaxTableGetName (gncEntryGetBillTaxTable entry))
>   ;       ))
>   ;     )
>
>
>
> Insert below (or in place of):
>
>        (if (tax-col column-vector)
>        (addto! row-contents
>         (if cust-doc?
>         (gncTaxTableGetName (gncEntryGetInvTaxTable entry))
>         (gncTaxTableGetName (gncEntryGetBillTaxTable entry))
>         )
>         ))
>
> Test exhaustively and let me know the results.
> It should really test for gncEntryGetBillTaxableentry etc., but seems to work without error as is.
>
> Regards
> Mike Evans
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list