VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: canteloop01 on June 07, 2012, 16:33:44 PM

Title: VM2: Wrong Tax calculation in order email-invoice
Post by: canteloop01 on June 07, 2012, 16:33:44 PM
I am using vm 2.0.6 and i have a problem with the invoice feedback to customers (invoice-email).

The tax value seems to be miscalculated but the total prices are correct. . (product's quantity does affect the error)

Thanx in advance.
Title: Re: VM2: Wrong Tax calculation in order email-invoice
Post by: schefzig on June 19, 2012, 14:16:33 PM
I have the same problem.
The e-Mail as well as the "print-version" in the backend is affected.
The total tax is calculated right, but in the detailled list above, tax is doubled if you order an article twice.

Regards

Schefzig
Title: Re: VM2: Wrong Tax calculation in order email-invoice
Post by: schefzig on June 19, 2012, 15:09:17 PM
I found it and made a fix that seems to work for me.

\components\com_virtuemart\views\invoice\tmpl\invoice_items.php

Line 75
<td align="right" class="priceCol"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($item->product_tax ,0, $qtt)."</span>" ?></td>            

Chenged to
<td align="right" class="priceCol"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($item->product_tax ,0, 1)."</span>" ?></td>

I don't know if there are other places that need to be changed (depending on different configurations) but as I said before: works for me.

Regards

Schefzig
Title: Re: VM2: Wrong Tax calculation in order email-invoice
Post by: vigier on June 22, 2012, 00:37:05 AM
Thnx a lot schefzig!!! This was one of the annoying bugs on my list...