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.
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: