Manual + Override shipping address = No Taxes

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
9 years 11 months ago #183958

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.34
-- Browser(s) name and version -- : Any
-- Error-message(debug-mod must be tuned on) -- : No error.

If you have a "shippable good" product and a tax rule for a state/location then turn the Manual Shipping method's "Override shipping address" to any option but the default "No", the tax rule will not apply.

If you set the product to be virtual, it works fine.

If you leave Override shipping address" with the default "No", it shows the correct tax
If you set Override shipping address" to "Hide, shows the correct tax.



If you set " Override shipping address" to Shop Address, Text, or HTML Text, it reports zero taxes.


I know the tax rule works as it should because as long as I leave it to "No" or a virtual good, it works fine.

My understanding is that when "Override Shipping Address" was on, the car was supposed to use the Shop Address for calculations.

The problem seems to be in the Manual Shipping Method's "Override shipping address".

I did find this in August and include it in my other TaxCloud method but I think it is getting lost in that thread because it started about taxes. It has persisted through version 2.3.2 to the current 2.3.4 (Business version).

I don't believe this is a Tax Rule or TaxCloud issue but something in the manual shipping method dealing with override / general tax issue as far as I can tell. There is no PHP errors on screen or in the web logs so I think this is just logic error in the code.

At any rate, I would appreciate any help in solving this bug.

Love HikaShop, still my favorite.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
9 years 11 months ago #184018

Hi,

I did a test on my end and I get taxes on the cart regardless of the value of the "Override Shipping Address" for the shipping method selected on my checkout.
It's not possible that the system uses the shop address for calculations of the taxes since there is no shop address it can use for that. The system requires a state/country to be selected for it to check the zone restriction of the tax rules. The shop address input field allows any kind of text to be added in the shop address and thus it's not possible to accurately extract the country/state from the shop address. That's why, in such cases, it's the "main tax zone" option which is used by the system to calculate the tax rate.

So the fact that I still see the tax applied regardless of that "Override shipping address" option simply means that the main tax zone of my configuration is a taxable zone, while on your end, the zone you selected there is not taxable.

The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
9 years 11 months ago #184027

OK, that makes sense. It wasn't clear.

I adjusted the Main tax zone to match the tax rule.
Now the tax rule does apply so this looks right.

Note that this also the case when TaxCloud is enabled (regardless of what "Use origin address on override" is set too. It uses the Tax Rule value. In that case, it appears that the order wouldn't be reported to TaxCloud. Is that correct? This may be why I was confused in the other thread.

Right now just having the tax rule work is a major win. So thank you so much.

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
9 years 11 months ago #184050

Hi,

Great, we're moving forward :)

Ideally, if the "Use origin address on override" option is activated, the tax should be reported too, but I understand that this doesn't work since I didn't change any code so far to make it happen.

Try to change the line:
$address = $order->cart->shipping_address;
to:
$address = $this->loadAddress();
if(empty($address)){
$address = $order->cart->shipping_address;
}

in the file plugins/hikashop/taxcloud/taxcloud.php and that should allow the system to use the origin address configured in the plugin as destination if the "Use origin address on override" option of the plugin is turned on and that the shipping method is overriding the shipping address.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
9 years 11 months ago #184162

FYI I've just tried that quick patch on my test site but it is still using the Tax Rule % instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum