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

Resolve tax calculation issues #880

Merged
merged 6 commits into from
Jun 16, 2023
Merged

Conversation

duncanmcclean
Copy link
Owner

This pull request aims to resolve some tax calculation issues, many of which were introduced as part of #873 and #874.

This PR resolves the following issues:

  • Totals weren't being reset at the start of the calculation process - this caused issues when updating existing orders (eg. updating a line item quantity)
  • Standard Tax Engine: Fixed an issue where the line item total was being set to the tax calculation amount, rather than 'line item total - tax calculation amount' when price includes tax.
  • Standard Tax Engine: Fixed an issue where the tax calculation wasn't correct.

duncanmcclean and others added 6 commits June 16, 2023 12:21
This was the calculation previous to me refactoring the calculator.
Product price: 3080
Tax rate: 10%

Previously, tax amount was: 280
Now, after fixing, it is: 308
@duncanmcclean duncanmcclean merged commit 60113b9 into 5.x Jun 16, 2023
@duncanmcclean duncanmcclean deleted the fix/incorrect-tax-calculations branch June 16, 2023 12:02
@github-actions
Copy link

Released as part of v5.2.1.

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.

1 participant