-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Issue-9231 include promotions into order taxes calculation #10116
base: main
Are you sure you want to change the base?
Issue-9231 include promotions into order taxes calculation #10116
Conversation
Manage this branch in SquashTest this branch here: https://sacha759231-taxes-not-includin-0zj6a.squash.io |
Hi @sacha75, I was looking at this by copying your code across into a version of Spree 4 I have locally, and I can't get the correct tax. Can I just check the values I get with your results? I added 2 items to cart, $100 each with a $50 whole order discount. I get tax at $16.67 when I go to checkout. Expected tax of $12.50 ($100 USD item -$25 = $75 tax in price $12.50) |
Hi @MatthewKennedy, Thanks for your feedback, I had a wrong condition and I have commited an update. I'm trying to get the test passed on my local version then on Circleci, I'll keep updating this PR until it works |
I changed it to work only with included_tax_total as calculation should be different for additional_tax_total. Spree allows a mix of included and additional tax, in that case there is no way to calculate correctly the new tax. One option would be to add to order adjustment an information to know if user intended adjustment to apply it to the amount with or without tax. On the other hand not fixing that issue results into incorrect tax calculation which is a problem for e-businesses. Before going any further I would like to have the opinion of the Spree team |
Hi @sacha75 Have you tried this extension? The extension works for mixed cart of taxed and none taxed items. |
See Issue 9231
This workaround will result into correct tax calculation at order level with order adjustments.