-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve included (VAT-style) taxes #461
Comments
FYI: While the initial need for the PR was MOSS, the PR also fixes a number of idiosyncrasies of the old VAT code (like the strange idea of "refunding" taxes when outside the default VAT zone). The big catch is that with the PR, product and line item prices actually change depending on the user's ... and one that fixes rounding issues with VAT spree/spree#6645 If you have any questions, do feel free to reach out. |
👍 Have some issues with tax included prices and whole order promotions as well. The promotion discount has to be taken into account when calculating tax as well. With the tax on line_items, and the promotions on the order this is currently very hard to do correctly. In this sample there is a 10% discount on orders > $100. The tax amount should be calculated after promotions, making the tax amount $24.98 and not $27.75 God I hate taxes :D |
We decided to just not have whole-order promotions. Your case is still sort of manageable, but if you have differently VAT-taxed items in your cart, the taxation of whole-order promotions just becomes a huge mess. You start having questions like how much of the promotion would apply to reduced VAT goods, and how much of the promotion would apply to the rest? Oh, and mixed carts are just plain impossible with the VAT calculated on the order. As for your case: Couldn't you tax adjust the order by the included VAT of your promotion? |
@mamhoff Yeah, I solved it in this instance with re-adjusting the tax amount. Also with non-vat orders, calculating the promotion on the pre-tax-amount on the order. The case you describe with the different taxes per product are nearly impossible indeed. |
So... it turns out this one might be interesting, too: spree/spree#6852. Here I fix the |
I'm back from holidays, and will hopefully get some time to spend on this one. I'd like to get feedback on a number of ideas I've been having, hopefully making the entire taxing thing quite a bit more elegant:
Especially the second one of these points will drastically simplify tax rate selection and allow a pretty large, beneficial refactoring of a number of fun spots. Oh, very important: the semantic meaning of total = price * quantity - promotions
pre_tax_total = round(total - included tax) As far as I'm concerned, the If anyone has input on anything here, do weigh in. Especially naming is paramount, and I might not have come up with the best names for everything. I'll be collaborating on this with @peterberkenbosch 😎 |
We had some minor improvements into 1.2, and will target the rest for 1.3 |
Closing since 1.3 has been out for a while. |
spree/spree#6295
The text was updated successfully, but these errors were encountered: