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

OrderItem prices should be re-calculated when changing tax zones #1216

Closed
michaelbromley opened this issue Nov 10, 2021 · 0 comments
Closed
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@michaelbromley
Copy link
Member

Describe the bug
When the active tax zone changes, this might affect the price of OrderItems in the active order. For instance, during checkout, the customer might set the country to one in a different zone when invoking the setShippingOrderAddress mutation.

Currently, the listPrice and listPriceIncludesTax will remain as it was at the time the OrderItem was added to the order.

To Reproduce
Steps to reproduce the behavior:

  1. Create a TaxZoneStrategy which sets the active tax zone based on order.shippingAddress.countryCode if it is set.
  2. Have the default channel set to pricesIncludeTax: true and the default zone's tax rate to 20%
  3. Create a ProductVariant "Foo" with a price of $100. This $100 will include tax for the default zone, so the actual net price is $83.33.
  4. Add Foo to an order, see the price as $100.
  5. Set the order shippingAddress country to be a country outside the Channel's default tax zone. This new zone should have a tax rate of 0%.

Expected behavior
The price of Foo in the order should now be reflected as $83.33, because the default Zone's tax rate of 20% has been removed, and the new tax rate of 0% has been applied.

But in actuality it will remain as $100.

Environment (please complete the following information):

  • @vendure/core version: 1.3.3
  • Nodejs version: any
  • Database (mysql/postgres etc): any
@michaelbromley michaelbromley added the type: bug 🐛 Something isn't working label Nov 10, 2021
@michaelbromley michaelbromley self-assigned this Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant