Post by greymatter » Wed Mar 07, 2012 11:07 pm

I have certain items that are non-Taxable. UK law states that if items purchased are non taxable then the shipping is non taxable. If items are taxable, then shipping should be taxable.

The problem I've got is that even if a customer purchases a non-taxable item, it still adds tax to the shipping in OpenCart.

Does anyone know of a way around this or whether there is an extension for it?

Thanks for your help.

Newbie

Posts

Joined
Wed Mar 07, 2012 11:04 pm

Post by ghartwig » Wed Mar 13, 2013 6:58 pm

The same rules apply in Texas, and we're having the same problem. I'm surprised this hasn't been addressed.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by Johnathan » Wed Mar 13, 2013 8:43 pm

You need to apply the same tax class to the products and the shipping method. That tax class will then only be applied when eligible.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ghartwig » Thu Mar 14, 2013 5:35 pm

Thanks, Jonathan, but I believe I've done that. But if I have only non-taxable products in the cart, it still applies tax to the shipping amount. I think it would take special logic to only apply tax to the shipping if the taxable total is not zero. I've spent several hours looking through the code and I think I'm getting close to finding it. OOP and MVC code is difficult to figure out from scratch without having to understand ALL of it.

I do have lots of add-ons, though (including for shipping), so there may be something non-standard about the one I'm using. If you're sure OpenCart operates as I expect, then I'll concentrate on my shipping add-on.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by Johnathan » Thu Mar 14, 2013 8:01 pm

Yes, taxes should only be applied when the shipping method has a tax class applied. You can test this out by installing a fresh installation of OpenCart and using the default modules.

If that's not working, it sounds like your shipping method is not applying the tax class properly. If it's an extension, you should contact the author for support.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ghartwig » Fri Mar 15, 2013 7:46 am

I have a Texas state tax class applied to some products as well as the shipping method. Tax should not be calculated for shipping, though, when only non-taxable products are in the store. I think this is special logic that needs to be in the code (and I haven't found it yet). Without a special check, I would expect the code to apply tax to applicable products and also to shipping (whether or not there are taxable products).

I tried it on a clean install and the problem seems to happen there also.

I'm using Zone Plus Shipping by Qphoria.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by ghartwig » Fri Mar 15, 2013 2:25 pm

I think I have the same problem with your Optional Fee/Discount extension. I'm using it to add an additional Rush shipping charge (we're corresponded about it lately). I see where taxes are applied in your code but I don't see yet how to check for a non-zero total of taxable products. Once I have that, it should be simple to add a check there, and in the base store code.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by ghartwig » Fri Mar 15, 2013 7:42 pm

I think I have it fixed. I figured out how to see if there are taxable product amounts in the cart.
In catalog/model/total/shipping.php, I changed:

Code: Select all

	if ($this->session->data['shipping_method']['tax_class_id']) {
to:

Code: Select all

	$total_taxes = array_sum($this->cart->getTaxes());
	$have_taxable_products = ($total_taxes > 0);

	if ($this->session->data['shipping_method']['tax_class_id'] && $have_taxable_products) {
I made a similar change to catalog/model/total/optional_fee.php.

I'm thinking I could write a totals add-on that would go through all total and add entries to back out taxes if there are no taxable products. I'm not sure that would look good on the invoice, though. I've got a start on it anyway and we'll see. That would keep from having to modify multiple files (including unknown add-ons).

I'm not happy about the solution, but at least I think it works.

I'm attaching my vqmod package.

| Oops, fixed typo in the code

Attachments

Last edited by ghartwig on Sun Mar 17, 2013 8:52 pm, edited 1 time in total.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by Johnathan » Fri Mar 15, 2013 10:36 pm

Ah, I see the issue. Yes, the default OpenCart does not check whether any products are taxed to then apply tax to shipping, it just uses the tax class location and rate. I think the edit you've suggested should work fine. I'll see about adding this as an option to future releases of my shipping and fee/discount extensions.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by scanreg » Thu May 23, 2013 12:44 am

is there ever a case where the item is non-taxable but the shipping is taxable?

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by Qphoria » Thu May 23, 2013 1:35 am

scanreg wrote:is there ever a case where the item is non-taxable but the shipping is taxable?

thanks
I think it would be up to the individual state/country laws. With Texas in mind, looking at their laws here:
http://www.window.state.tx.us/taxinfo/s ... l#collect8
Looking at number 8
you only charge tax on shipping if the product is taxed

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ghartwig » Thu May 23, 2013 5:50 am

This rule does complicate calculations a bit, but does end up being common-sense. "Tax-free" then ends up being really tax-free as opposed to mostly tax-free.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by joshgeake » Tue Jun 04, 2013 10:50 pm

This *almost* does it but it doesn't apportion the VAT, it just charges the whole lot. Remember HMRC only want the correct proportion of the postage fee to be VATted, not the whole lot.

Also it only charges the net postage for all 0% VAT orders when what would be much more desirable is if it charged the standard gross postage rate, only with 0% VAT.

Newbie

Posts

Joined
Fri Aug 03, 2012 10:25 pm

Post by ghartwig » Tue Jun 25, 2013 10:58 pm

I'm afraid that I don't have any experience with VAT and don't really understand what you're saying.

Newbie

Posts

Joined
Sat Feb 02, 2013 9:00 pm

Post by thinksync » Fri Jul 26, 2013 5:17 am

scanreg wrote:is there ever a case where the item is non-taxable but the shipping is taxable?

thanks
It depends on the country.

In Australia, our GST (equivalent of VAT) is always charged on shipping because shipping is a service. It doesn't matter whether the items in the cart are GST free.

In the UK by contrast, the shipping should always reflect the VAT status of the items being purchased.

So if you have both taxed and non-taxed items in the cart, the tax on shipping should reflect the proportional amount of tax paid on the products in the cart.

I've yet to find a shipping solution in OC that will deal with mixed tax products and shipping in the UK, although Johnathan from Clear Thinking has the closest solution I can find.

Newbie

Posts

Joined
Fri Jul 26, 2013 5:05 am

Post by scanreg » Fri Jul 26, 2013 11:35 pm

thinksync wrote:I've yet to find a shipping solution in OC that will deal with mixed tax products and shipping in the UK, although Johnathan from Clear Thinking has the closest solution I can find.
which extension?

maybe he can tweak it

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by Johnathan » Sat Jul 27, 2013 12:42 am

I'm planning on adding this feature to all my shipping and fee/discount extensions, but I'm not sure when since I'll have to update all my 55+ extensions for the upcoming OpenCart 2.0 release. I may be able to give a code edit to get it working, though, so feel free to contact me at www.getclearthinking.com/contact if you want to try it out.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by scanreg » Sat Jul 27, 2013 1:14 am

Johnathan wrote:I'm planning on adding this feature to all my shipping and fee/discount extensions, but I'm not sure when since I'll have to update all my 55+ extensions for the upcoming OpenCart 2.0 release. I may be able to give a code edit to get it working, though, so feel free to contact me at www.getclearthinking.com/contact if you want to try it out.
will this be able to be used internationally? meaning, if you have a facility in the U.S. but ship all around the world, will this account for VAT and tax and whatever just in case foreign govs want to collect whatever their tax structure is but then hide VAT or whatever for U.S. sales as well ?

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by Johnathan » Sat Jul 27, 2013 11:35 pm

Thinking on it, I'm not sure I need to change how the extensions work: if you're charging tax on shipping for only certain products, that means you need to have separate shipping costs for them already. Since you'd need to divide the shipping cost up, you'd need two different rates (one taxed and one not taxed) and then need to combine them.

You can already create that situation using Category-Based Shipping, Manufacturer-Based Shipping, or Product-Based Shipping. For example, I recently gave this example to someone using Category-Based Shipping:

Code: Select all

RATE #1
Title: Shipping
Sort Order: 1
Multi Rate Calculation: Sum
Tax Class: VAT
Categories: NOT, Category A
Rate Type: Weight-Based
Cost Brackets:
 - (as needed)

RATE #2
Title: Shipping
Sort Order: 1
Multi Rate Calculation: Sum
Tax Class: (none)
Categories: ANY, Category A
Rate Type: Weight-Based
Cost Brackets:
 - (as needed)
OK, I just realized that even though separate tax classes can be set, a shipping rate needs to have a single tax class returned when it returns the shipping quote. This is OpenCart dependent, and may not be able to be fixed within my extension, although I'll give it a try. I'll release an update for my extensions once I get it figured out.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by thinksync » Tue Sep 24, 2013 9:29 am

Just wanted to add in here that Johnathan's extension does fully support the way VAT is supposed to be handled.

It's the only extension that does so.

I now have around 50 rates that cover the UK, EU and world with multiple tax rates, EU VAT ID validation and DHL surcharge zones.

Johnathan has been an absolute superstar in helping get this very complex shipping setup sorted out.

Newbie

Posts

Joined
Fri Jul 26, 2013 5:05 am
Who is online

Users browsing this forum: No registered users and 1 guest