Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Taxes rounded to two decimal places when using modue #179

Closed
StephenBadger opened this issue Sep 24, 2018 · 3 comments
Closed

Taxes rounded to two decimal places when using modue #179

StephenBadger opened this issue Sep 24, 2018 · 3 comments

Comments

@StephenBadger
Copy link

StephenBadger commented Sep 24, 2018

The issue is that when using the Avatax module, the tax summary in checkout is rounded to two decimal places.

Preconditions

  1. Magento 2.2.3
  2. avalara/avatax 15.5.2
  3. PHP 7.0.31

Steps to reproduce

  1. Prepare an order, go to checkout, set shipping to Quebec.
  2. Get tax summary to display (configure in the backend of magento if needed)
  3. Note that QST is shown as 9.98, where it should be 9.975
  4. To test Magento Core taxes, to contrast the display, set up the following:
    4.1 In Tax Zones and Rates create two rates, for Canada - QC, Rates 5 and 9.975
    4.2 In Tax Rules create two, one for the 9.975 one for the 5, have the priorities differ and set to calculate off subtotal only
    5 Disable Avalara, and go to checkout, view that 9.975 shows instead of 9.98

Expected result

  1. Tax should not be rounded as such, or options should be provided to specify the precision.

Actual result

  1. Tax comes in from Avalara correctly, 0.0975 / 9.975%
  2. Tax gets rounded somewhere in the module.
  3. Tax Summary return in totals section during the update call is rounded
  4. Remove Avalara and using Magento taxes correctly shows 9.975

Avalara Taxes:
image

Ajax call which shows that the percent is rounded before getting to the frontend
image

Magento Taxes:
image

My Tax Config for testing core vs Avalara

image

image

@rsisco
Copy link

rsisco commented Oct 16, 2018

@StephenBadger - I've identified the place in the code where I can make the necessary change to keep the rate from being rounded to 2 decimal places. Just to be clear, you aren't indicating that the tax calculation is off, only that the displayed rate is rounded, correct?

@StephenBadger
Copy link
Author

@rsisco Correct. It is a display problem, not a calculation problem. The percentage is rounded before it hits the frontend.

@rsisco
Copy link

rsisco commented Oct 25, 2018

This issue has been addressed in release #1.4.9. Closing issue.

@rsisco rsisco closed this as completed Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants