Multiple VAT Lines on Invoice

Hello all.

I need to write multiple VAT line on an invoice.

For example :

Product1 %18 Qty:1 Price:1 Total:1
Product2 %8 Qty:1 Price:1 Total:1

I need to report this like this :
VAT%8 Total : 0.18
Vat%18 Total : 0.08

I also search for document and found this :

{object_total_vat_x.y}

but couldn’t manage to figure out what “x.y” is.

Thanks for your help in advance.

Sertac

It’s really a pity that (at least the English) user documentation - for an otherwise well structured program - is so “basic” only.

In case you don’t know this site already, take a look here:

http://okfn.es/cuentas/build/html/index.html

Best regards

1 Like

A starting point there might be:

http://okfn.es/cuentas/build/html/d4/dbb/pdf__azur_8modules_8php_source.html

Line 399

I assume the you have to follow the function call “backwards” to find out about the link to your second VAT.

Best regards

1 Like

Thanks for your reply.

But we have 2 problems.

  1. I don’t know php :happy:
  2. The link you sent seems to be work on pdf but i use odt template for invoicing. Any difference?

Thanks again for your early reply.

I’m somewhat flabbergasted as well :huh:

Seems that the needed ODT-required object is not implemented in the source code.

I’ll investigate further, because I plan to use ODT templates in the future too.

Best regards

1 Like

x = 8 or 18
y = 0

Just tried it - but to no avail (In Germany: 19%, 7% respectively):

... object_total_ht = {object_total_ht} object_total_vat = {object_total_vat} object_total_vat_19.0 = {object_total_vat_19.0} object_total_vat_7.0 = {object_total_vat_7.0} object_total_ttc = {object_total_ttc} object_total_discount_ht = {object_total_discount_ht} object_vatrate = {object_vatrate} ...
Result is:

... object_total_ht = 300 object_total_vat = 51 object_total_vat_19.0 = {object_total_vat_19.0} object_total_vat_7.0 = {object_total_vat_7.0} object_total_ttc = 351 object_total_discount_ht = 0 object_vatrate = {object_vatrate} ...
ODF works ok.

Best regards

Should read:

PDF works ok.

Best regards

PS: Why can’t I edit my post - say for 15 minutes after sending it?!? :dry:

1 Like

So how should we use it on odt template?

{object_total_vat_x.y} (Dolibarr >= 3.5.0, is vat total for rate x.y}
{object_total_vat_18} (Dolibarr >= 3.5.0, is vat total for rate x.y}
{object_total_vat_18.0} (Dolibarr >= 3.5.0, is vat total for rate x.y}

Which one is right and will this solve multiple taxes on invoice problem?

How do you edit PDF templates for your invoice?

How do you edit pfd templates for your invoice?

No need to Edit - model “crabe” works out of the box!

Selection_700.png

Best regards

1 Like

Any news on that matter yet?
I am still unable to use {object_total_vat_x.y} on an ODT template.

Ok, how do you customize the look of crabe template?

Thanks.

@casati: thank you for the link ! after almost ten years of working with dolibarr, i did not know it ! it’s a must be i have to investigate.

Try with several zero as decimal :

{object_total_vat_8.000} for a 8%
{object_total_vat_18.000} for a 18%

2 Likes

Thank you so much for this one!

I can confirm that it works in my case
{object_total_vat_locale_13.000}
{object_total_vat_locale_23.000}

prints out the correct amount

Thanks again!

1 Like

It’s done.

Thank you.

Is it also possible to write the main amounts seperately. (Not just taxes, the main amount of two different VAT types?)

Thanks again.

Sorry to say that the above solution doesn’t work for me :dry:

Interface Language: English US
Multilanguage
Invoice Language: German

object_date = {object_date} object_date_limit = {object_date_limit} object_date_creation = {object_date_creation} object_date_validation = {object_date_validation} object_total_ht = {object_total_ht} object_total_vat = {object_total_vat} object_total_vat_x.x = {object_total_vat_x.x} (x.x with vat rate) for a 7% = {object_total_vat_locale_7.00} for a 19% = {object_total_vat_locale_19.00} object_total_ttc = {object_total_ttc} object_total_discount_ht = {object_total_discount_ht} object_vatrate = {object_vatrate} object_payment_mode = {object_payment_mode} object_payment_mode_code = {object_payment_mode_code} object_payment_term = {object_payment_term}
results into this:

object_date = 10/10/2015 object_date_limit = 10/10/2015 object_date_creation = 10/10/2015 object_date_validation = 10/24/2015 12:00 AM object_total_ht = 600 object_total_vat = 51 object_total_vat_x.x = {object_total_vat_x.x} (x.x with vat rate) for a 7% = {object_total_vat_locale_7.00} for a 19% = {object_total_vat_locale_19.00} object_total_ttc = 651 object_total_discount_ht = 0 object_vatrate = {object_vatrate} object_payment_mode = - object_payment_mode_code = object_payment_term = Sofort nach Erhalt
Best regards

try 000.