Description
Preconditions and environment
- Magento version: 2.4.6-p3
- Php version: 8.1
- Tax Rate configuration (22%)
- Tax configuration
- Discount configuration (10%)
- product 1 (hat)
special price 733.61 - product 2 (jacket)
special price 569.67
Steps to reproduce
Two ways to reproduce the error:
Method 1:
1- add product 1 * 3 to the cart
2- add product 2 * 2 to the cart
3- go to the checkout
4- apply the discount and use the country for the tax to be applied
5- create order
Method 2:
1- add product 2 * 2 to the cart
2- add product 1 * 3 to the cart
3- go to the checkout
4- apply the discount and use the country for the tax to be applied
5- create order
Expected result
The function round should be applied when calculating the price_after_discount, discount_amount and taxes amount.
the actual total of the order should be 3667,52.
Actual result
Magento not doing the round function when calculating price_after_discount, discount_amount and taxes amount for the second product added to the cart.
resulting in total 3667,51 when reproducing the error using method 1 and 3667,5 when reproducing the error using method 2.
Additional information
Here is the calculation that magento do, column (B+C) for first order, column (D+E) for the second order.
the cells with background yellow where magento miscalculate the price (possibly by not rounding the price).
the correct total is the result of the column (B+E) which are the correct calculations and matches the manual calculations.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.