- Issue created by @AaronBauman
- πΊπΈUnited States AaronBauman Philadelphia
This patch uses the "amount_to_collect" received from Taxjar and creates a single, Adjustment on the Commerce Order for the tax amount.
Please review.
When checking out with multiple line items, Taxjar (the API service) returns a tax amount for each line item, as well as an overall "amount to collect".
Commerce Taxjar (the Drupal module), always creates an order adjustment for each line item, using the individual line item tax amounts.
However, this calculation can be incorrect due to rounding errors.
For example, observed behavior:
Expected behavior:
Total tax on order matches "amount to collect" returned from Taxjar (API service).
Proposed solution:
- Remove code that creates Commerce Line Item adjustments
- Create a mechanism to create a single Commerce Order adjustment to represent tax
Active
2.0
Code
This patch uses the "amount_to_collect" received from Taxjar and creates a single, Adjustment on the Commerce Order for the tax amount.
Please review.