[Skip to main content](#vessel-content)

#   more VAT types on invoice

##

- **[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")**
- [![gGuzz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1545-gguzz "View gGuzz's Profile") Topic Author
- [ Offline](/forum/user/1545-gguzz)

Less More

- Posts: 13
- Thank you received: 0
-
-

15 years 7 months ago [\#13090](#13090) by [gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")  *[more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13090 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")* was created by *[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")*

Hi,

There are in one order several products with different VAT%.
Is there a way to show these with amounts on the invoice?

A small example:

product A 10
product B 12
---
24
VAT 10% 1
VAT 20% 2,4
---
27,4

thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14282
-
-

15 years 7 months ago -  15 years 6 months ago [\#13103](#13103) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13103 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

Hi,

You will have to edit the file invoice of the view order via the menu Display-&gt;Views and calculate the 2 different VATs based on the products in the order. Something like this: Code:

$vat1 = 0; $vat2 = 0; $vat1_rate = 10; foreach($this-&gt;order-&gt;products as $product){ if($product-&gt;order_product_tax==$product-&gt;order_product_price/$vat1_rate){ $vat1+=$product-&gt;order_product_tax*$product-&gt;order_product_quantity; }else{ $vat2+=$product-&gt;order_product_tax*$product-&gt;order_product_quantity; } }

And then use $vat1 and $vat2 to display the two vat lines.

Last edit: 15 years 6 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")**
- [![gGuzz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1545-gguzz "View gGuzz's Profile") Topic Author
- [ Offline](/forum/user/1545-gguzz)

Less More

- Posts: 13
- Thank you received: 0
-
-

15 years 6 months ago -  15 years 6 months ago [\#13188](#13188) by [gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")  Replied by *[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13188 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

Thank you for your quick response, this is a perfect solution.
In your example a fixed VAT value is used. Is it also possible to use the var for my tax rate? Or is this a too complex solution?

One more question: this is only visible in back-end invoice printing. If my customer wants to print the previous invoice (containing one VAT type) is shown.
Also the logo on the invloice is not shown, though in back-end it is.

Last edit: 15 years 6 months ago by [gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14282
-
-

15 years 6 months ago [\#13210](#13210) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13210 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

For the front end invoice, you will have to edit the file show of the view order in the same manner.

It's not possible to load the info of which tax was used as this information isn't stored in the database for the order so that's not possible to do it automatically.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")**
- [![gGuzz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1545-gguzz "View gGuzz's Profile") Topic Author
- [ Offline](/forum/user/1545-gguzz)

Less More

- Posts: 13
- Thank you received: 0
-
-

15 years 6 months ago [\#13337](#13337) by [gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")  Replied by *[gGuzz](/forum/user/1545-gguzz "View gGuzz's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13337 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

It is not working correct yet.
My fault. In my example I have set the tax values on easy values.
But low tax = 6% and high is 19%

Now I have a rounding problem (I presume) because I had also set: please look in the file adminsitrator/components/com_hikashop/classes/currency.php in the function addTax near the end of the file. Could you try to remove the line:
$price-&gt;price_value = round($price-&gt;price_value,$round);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14282
-
-

15 years 6 months ago [\#13376](#13376) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#13376 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

You will need to tell us more about your problem. What kind of rounding error do you have ?
If you change back that line of code, does that change anything ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Ventaka](/forum/user/2008-ventaka "View Ventaka's Profile")**
- [![Ventaka's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2008-ventaka "View Ventaka's Profile")
- [ Offline](/forum/user/2008-ventaka)

Less More

- Posts: 12
- Thank you received: 0
-
-

15 years 2 months ago -  15 years 2 months ago [\#23151](#23151) by [Ventaka](/forum/user/2008-ventaka "View Ventaka's Profile")  Replied by *[Ventaka](/forum/user/2008-ventaka "View Ventaka's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#23151 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

Hi Nicolas,

Look, I'm kinda lost to try put this working as well...

I understood the idea, but I don't know exactly which file should I change... On the Display &gt; Views I saw already 2 files for ORDER, but I don't know how to do it...

So, what I want, if you could do it for me, just to tell me exactly where I have to replace your code.

Take a look on the picture:

image missing http://www.hikashop.com/media/kunena/attachments/legacy/images/vat.png

I just need this for the Order on back-end (for some legal reasons we have to divide the VAT taxes)

Thank You ![:)](/media/kunena/emoticons/3.png ":)")

- [ ![vat.png](/forum/attachment/1586) ](/forum/attachment/1586 "vat.png") [ ](/forum/attachment/1586?download=1 "vat.png")

Last edit: 15 years 2 months ago by [Ventaka](/forum/user/2008-ventaka "View Ventaka's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14282
-
-

15 years 2 months ago [\#23171](#23171) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: more VAT types on invoice](/forum/4-how-to/13090-more-vat-types-on-invoice#23171 "Hi,  There are in one order several products with different VAT%. Is there a way to show these with amounts on the invoice?  A small example:  product A 10 product B 12 --- 24 VAT 10% 1 VAT 20% 2,4 --- 27,4  thanks in advance.")*

I explained which file to change in my message:

> You will have to edit the file invoice of the view order via the menu Display-&gt;Views

You should have more than two files for the view "order", but you should have only one "invoice" file for your back end template.

We can do the modification for you for a small fee. If you're interested, you can use our contact form to request a quote.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzMDkwLW1vcmUtdmF0LXR5cGVzLW9uLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.225 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
