In the shopping cart the product total excl. VAT + 19% VAT = selling price. For example 29.41 Euro + 5,59 Euro = 35 Euro. This is ok.

In the admin area and on the orders this is different. The amount of VAT is calculated here based on the selling price and not based on the excl. VAT price. 19% VAT of 35.00 Euro is more than 19% VAT of 29.41 Euro. This is wrong.

The selling price in the shopping cart matches the admin & order selling price, but on the orders and in the admin area the displayed amount of VAT is higher than it should be. So the excl. VAT and selling price are ok, but on the VAT line there is a higher amount of VAT (In Euro) visible, but this isn't calculated into the selling price.

See for example the attached screenshots.

I hope someone can help, since the tax I have to pay now is more than I should. I am using Drupal 6.22 with Ubercart 2.6.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tahiticlic’s picture

Subscribing : I've exactly the same problem.

The point is the taxable amount calculated in uc_vat_apply_tax function returns the price of the product INCLUDING VAT, so the VAT is indeed calculated with the function :
(excl VAT price * (1+VAT rate)) * (VAT rate)
instead of
(excl VAT price ) * (VAT rate)

You can change the line 882 of uc_vat.module to this :
$taxable_amount += uc_taxes_apply_item_tax($item, $tax)/(1+$tax->rate);

But I think the problem is elsewhere and there should be a better solution...

Taart’s picture

On line 882 I see: if (is_array($order->line_items) && is_array($taxed_line_items)) {

I guess it's line 878 in my editor:

$taxable_amount += uc_taxes_apply_item_tax($item, $tax);

OR line 887:

$taxable_amount += $callback($line_item['amount'], $order, $tax) / $tax->rate;

Can you tell me which one to change? I already changed the first, but that didn't help, also after flushing cache.

Good to hear I'm not the only one with this problem, hope it will be fixed soon.

mandreato’s picture

Subscribe

tahiticlic’s picture

I think the second line is here to allow other modules to act on the tax computation, I don't know if you have such modules installed. I think this line needn't to be modified.

To see the benefits of the change on the FIRST line (878 for you), you have to create a new order, because data are stored on the order creation and not computed again after, so you won't see the change on pre-existing orders.

mandreato’s picture

I've modified line #878 (flushed too) as suggested, but it solves only the problem at the .../cart/checkout page, whilst on .../cart/checkout/review and .../admin/store/orders/... there is still the wrong tax amount.

Maybe we have to find the error on another part of the module.

Taart’s picture

I added an order @ /admin/store/orders/create and it didn't work there, can't check the real order process that often, because I have to pay there.

So indeed, now we need to know how to fix the invoice and /admin parts.

salim’s picture

same problem here. I will try to go back to the earlier release: there wasn't such an issue.

Bruno-2M’s picture

Subscribe

velpan’s picture

Subscribe

longwave’s picture

Status: Active » Closed (duplicate)

Pretty sure this is a duplicate of #1170992: double VAT