Skip to content
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

Merged
merged 10 commits into from
Oct 12, 2024

Conversation

rolinbos
Copy link
Contributor

@rolinbos rolinbos commented Oct 2, 2024

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

Fix for calculating the VAT price for shipping. It sets the same behavior as for the line items.
@rolinbos rolinbos changed the title Basic tax engine shipping VAT fix DRAFT: Basic tax engine shipping VAT fix Oct 2, 2024
@rolinbos rolinbos marked this pull request as draft October 2, 2024 13:55
@rolinbos rolinbos changed the title DRAFT: Basic tax engine shipping VAT fix Basic tax engine shipping VAT fix Oct 2, 2024
@rolinbos rolinbos marked this pull request as ready for review October 2, 2024 18:46
@rolinbos rolinbos changed the title Basic tax engine shipping VAT fix [7.x] Basic tax engine shipping VAT fix Oct 2, 2024
Copy link
Owner

@duncanmcclean duncanmcclean left a 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:
Copy link
Owner

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:
Copy link
Owner

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
Copy link
Owner

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?

@rolinbos
Copy link
Contributor Author

rolinbos commented Oct 7, 2024

Hi @duncanmcclean, thanks for your feedback. I've changed the files.

@rolinbos rolinbos requested a review from duncanmcclean October 7, 2024 13:21
@duncanmcclean
Copy link
Owner

Thanks!

@duncanmcclean duncanmcclean merged commit 6461be9 into duncanmcclean:7.x Oct 12, 2024
6 checks passed
Copy link

Released as part of v7.5.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants