-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[7.x] Basic tax engine shipping VAT fix #1168
Conversation
Fix for calculating the VAT price for shipping. It sets the same behavior as for the line items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a couple unrelated changes in this PR (primarily around the blueprints). Can you please revert them?
@@ -0,0 +1,3 @@ | |||
tabs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file seem unrelated. Can you please revert them?
@@ -1,372 +1,3 @@ | |||
title: Order | |||
tabs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file seem unrelated. Can you please revert them?
- | ||
handle: price | ||
handle: product_variants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need the product_variants
field in this blueprint. Are you able to revert this file back to how it was?
Hi @duncanmcclean, thanks for your feedback. I've changed the files. |
Thanks! |
Released as part of v7.5.3. |
Add this moment when you define that the basic tax engine
included_in_prices
is set to true, it will think that the shipping costs also is included in the price. But the calculation of it isn't correct.With this PR, it will check for the basic tax engine if the
included_in_prices
is true or false.Before it calculates the VAT for shipping with 100 but it needs to be 100 + VAT rate so that you can calculate the price without VAT.
For example the shipping price is 6.50 with VAT. And the VAT is 21%
Before this PR:
650 / 100 * 21 = 136,5 = 137
So the price without VAT is:
650 - 137 = 513
But this isn't right.
With this PR:
650 / 121 * 21 = 112,80 = 113
So the price without VAT is:
650 - 113 = 537