Wrong Shipping Tax calculation

Where can I edit the formula that calculates the Shipping Tax Amount?

I do not know why currently it works like this:
Shipping: 100
Shipping Tax: 10%
Tax: 100

It always gives x10 the amount it should be,

And then it affects the Grand Total, too. So everything gets wrong.
Thank you for your help.

Another example:

Shipping: 180,00
Shipping Tax: 21,00%
Tax: 378,00 (it should be 37,8)

The products taxes are perfectly calculated.
I have not modified anything myself, only added the new percentage to the dropdown. It works wrongly for all the percentages in the dropdown, even the default ones included by default.

It may be the key to your newly added tax has some issues in formatting.
Can you share the array(vat_list) of your vat List from

custom/include/language/en_us.lang.php

It should be something like this,
dropdowneditor

I have the same issue with tax in shipping as mookie_jam.
I also think the Tax formula for shipping is wrong with x10 times the amount.

My question is also where can I edit the formula that calculates the Shipping Tax Amount?

Formula for calculating shipping tax and all other line item actions reside at modules/AOS_Products_Quotes/line_items.js which is a core file. you have to point to a custom file in order to add your custom changes. See quotes vardefs value for line_items

If it’s broken, we should just fix it in Core code… can anybody find the bug?

Thank you cherub-chum for pointing me to the calculation scripts.

I have found a solution, but it seems to me as workaround, because i cannot explain full the 1000 instead of 100. But when I change the next calculation:
var shippingtax_amt = shipping * (shippingtax/100);
to
var shippingtax_amt = shipping * (shippingtax/1000);

It works for me

image

1 Like

The error in calculation happens when you use comma as a decimal separator.
I am working on it. I. think that we need to unformat the value because if for exmaple you have in the dropdown 7.0 value with the decimal separator the value will be 70 because in this case the “.” is consider as a thousand separator.
ASAP as I resolved the issue I will posted my solution.
If you use /1000 and someone in your organization likes the displays in “.” the tax calculation is not good again.