I have just updated the modules Ubercart to 6.x.2.13 and VAT to 6.x-1.x-dev.
On the checkout site after pressing the calculation button for the shipping cost, the shipping cost are now shown without vat. (in my case it shows 4,62 Euro instead of 5,50 Euro). Before Updating it has shown the shipping costs including VAT.

I haven't changed any settings. Is there a way to change this?

Thank you!

Comments

Jon Pollard’s picture

I'm also seeing this problem - in the 'calculate shipping cost' pane, the shipping cost is displayed without VAT (£16.67). In the 'order total preview' on the same page it is showing with VAT (£20.00). Is this caused by an pdate or the new year??? :o)

fonant’s picture

Yes, I get this too, with the uc_flatrate module to define shipping costs.

The fix I've used is:

1) Add more context to the uc_flatrate_quote() function, in ubercart/shipping/uc_flatrate/uc_flatrate.module, so that the price altering can see the country, so it can apply the required VAT:

    ...
    // Add more context so uc_vat can apply VAT correctly.
    $order = new StdClass();
    $order->delivery_country = $details['country'];
    $context['subject']['order'] = $order;
    $context['subject']['line_item'] = array('type' => 'shipping', 'amount' => $rate);

in front of this line:

    $formatted = uc_price($rate, $context);
    ...

and also modify the case statement in uc_vat_price_handler_alter() in uc_vat/uc_vat.module so "amount" prices (from uc_flatrate's quote function) are altered the same as "line_item" prices:

    ...
    case 'amount':
    case 'line_item':
      uc_vat_line_item_price_alter($price, $context, $options, $tax_rates);
      break;
    ...
warbital’s picture

I have the same problem from updating Ubercart to 6.x-2.13 but still running Ubercart 2 VAT support 6.x-1.2.

The fix by Fonant wroks perfectly on my site.

Bruno-2M’s picture

Worked for me too with ubercart 213 and uc_vat 1.2
Thanks

ollioi’s picture

Still got the same problem ...

Jon Pollard’s picture

This is working for me too.

Thanks!