openfoodnetwork
openfoodnetwork copied to clipboard
Incorrect tax calcuation for customers outside taxed zone (inclusive tax), i.e. tax refund
Description
Relates to #9153.
Tested for legacy checkout.
When the scenario is:
- zone set as default included tax
- customer with a bill/ship address outside that zone
Then the tax adjustment will be incorrect upon checkout (order confirmation emails, invoices, etc). It can be corrected by the admin by editing the order and clicking "update and calculate fees".
Expected Behavior
Tax calculation should be correct, after checkout is completed.
Actual Behaviour
Tax calculation is incorrect, after checkout is completed; it needs to be corrected in the backoffice.
Steps to Reproduce
- Set up a zone default included tax, the respective tax category, a tax rate. Associate this with a product. Set the shop to charge taxes.
- Create a customer and checkout on the shop in step 1 with a bill ship address outside. Select a delivery (not a pick up) shipping method.
- As a customer: Notice your order confirmation
- As the admin: edit the order and click "Update and recalculate fees"
Animated Gif/Screenshot
Left: customer within tax zone Right: customer outside tax zone
Before clicking "Update and recalculate fees"
After clicking "Update and recalculate fees"
Workaround
Click "Update and recalculate fees"; re-sending emails and invoices.
Severity
bug-s3: a feature is broken but there is a workaround
Your Environment
- Version used: v4.2.8
- Browser name and version: Firefox 102
- Operating System and version (desktop or mobile): Ubuntu 22.04
Possible Fix
Relates to https://github.com/openfoodfoundation/openfoodnetwork/pull/9165