November Happy Hour will be moved to Thursday December 5th.

How to add tax to a shipping method

Vote:
 

Hi guys, 

I have created a shipping method which is standard shipment and has price 350 kr. I would like to add 25% tax to it. 

First, I created a tax category and added a tax in Administration>Tax Configuration.

My problem is when I call GetTaxToal(), it calculates just the total tax of the lineitems. 

I would like to know how to associate a tax with a shipping method?

Thanks, 

ChiChing

#197524
Edited, Oct 05, 2018 11:44
Vote:
 

Hi,

That does not sound right. When you call GetTaxTotal it calls to IShippingCalculator.GetShippingTax which calculates the shipping taxes of the shipment (which internally call to ITaxCalculator.GetShippingTax). Did you add matching taxes for the shipping address? 

#197526
Edited, Oct 05, 2018 13:05
Vote:
 

Hi Quan, 

I have the matching tax for the lineitems for the shipping address ( Tax Jurisdiction group Sweden and have "SE" as code) but maybe not in the shipping method.

https://www.dropbox.com/s/erfg23pneokg9rg/shipping_tax_0.jpg?dl=0 (I tried to upload a screenshot here, but it failed ).

Maybe I haven't set the the shipping tax right in CommerceManager. 

https://www.dropbox.com/s/hiti2kotx81kfsd/shipping_tax_setting.jpg?dl=0 (a screenshot)

Would you like to tell me how to create a tax to a shipping method in a correct way? 

Thanks,

Chiching

#197527
Oct 05, 2018 13:27
Vote:
 

Can't see your second screenshot. 

The shipping method is only used to calculate the shipping cost. The shipping tax is what ITaxCalculator is for. 

#197528
Oct 05, 2018 13:30
Vote:
 

Here is the second screenshot, the tax that I created on Tax Configureation https://www.dropbox.com/s/uk7p0x8sm3ciclw/shipping_tax_setting.jpg?dl=0

Here is the shippmethod method that I created, https://www.dropbox.com/s/ev1r12xa26fk1w9/shippingmethod.jpg?dl=0

The shipping method has Generic Gatway Provide, shall I use Jurisdiction Gateway instead?

#197531
Edited, Oct 05, 2018 13:41
Vote:
 

That actually does not matter. What really matters is this

So basically your tax jurisdictions must match the address you are shipping to. The country code must be the ISO ALPHA-3 format, in your case, it should have been SWE 

#197533
Edited, Oct 05, 2018 13:47
Vote:
 

I have a tax jurisdiction so I got the tax 25% for the LineItems. 

https://www.dropbox.com/s/klgus4mvz39kvfy/tax_jurisdiction.JPG?dl=0 (The tax jurisdiction that I created)

https://www.dropbox.com/s/7f2rv7j1tvi22oj/purchase_order.jpg?dl=0 ( A purchase order) 

The problem that I want to solve is, the purchase order has 

  • Items 1380 kr
  • Shipping total 350 
  • Taxes Total 345 (which is wrong, it should be (1380+350)*0,25 = 432,5)
#197537
Edited, Oct 05, 2018 14:05
Vote:
 

You set it wrong, the Country Code must be SWE, not SE. And you don't have to set the County 

#197539
Oct 05, 2018 14:12
Vote:
 

The taxes of items works with the tax jurisdiction has country code SE. 

So what you mean, in order to make the tax of shipping work, I must have SWE as countryCode?

#197541
Oct 05, 2018 14:53
Vote:
 

It should match the country code in your shipping address. Unless you are doing differently I guess you use the predefined countries code, which is SWE.

EDIT: OK now I see that you have your country code to be SE, so that is correct. Still you don't need the county information

Make sure you have shipping taxes configured (not just sales tax)

 

#197543
Oct 05, 2018 15:06
Vote:
 

I got the tax of shipping now. Thank you so much Quan! :)

#197546
Oct 05, 2018 17:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.