ACSD-66084: row_total_incl_tax
returns near-zero instead of 0.00 for fully discounted items in order API
The ACSD-66084 patch fixes the issue where row_total_incl_tax
is returned as a near-zero residual value in the order API response instead of 0.00 for fully discounted items. This patch is available when the Quality Patches Tool (QPT) 1.1.67 is installed. The patch ID is ACSD-66084. Please note that this issue is scheduled to be fixed in ÃÛ¶¹ÊÓÆµ Commerce 2.4.9.
Affected products and versions
The patch is created for ÃÛ¶¹ÊÓÆµ Commerce version:
- ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.7-p5
Compatible with ÃÛ¶¹ÊÓÆµ Commerce versions:
- ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.5 - 2.4.8-p1
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
The row_total_incl_tax
is returned as a near-zero residual value in the order API response instead of 0.00 for fully discounted items.
Steps to reproduce:
- Create a product with a price and a special price. Go to Catalog > Products > Click Add Product > set Price to $25 and Special Price to $16.99 under Advanced Pricing.
- Go to Stores > Taxes > Tax Zones and Rates and add a 20% rate. Then go to Tax Rules and create a rule and assign
Taxable Goods as the product tax class. - Create a sales rule with a 100% discount and a coupon. Go to Marketing > Promotions > Cart Price Rules and add a rule with a 100% discount and then use Specific Coupon and enter your code.
- Go to Stores > Settings > Configuration > Sales > Tax > and configure tax settings.
- Enable free shipping. Go to Stores > Settings > Configuration > Sales > Delivery Methods > Free Shipping. Set Enabled to Yes and adjust settings.
- Go to the product page and select Add to Cart. Go to the shopping cart and apply the coupon code.
- Place the order with the applicable tax zone.
- Generate an admin token (API) via REST API.
- Retrieve order details via REST API.
- Check
row_total_incl_tax
in the response.
Expected results:
row_total_incl_tax
should return a currency-appropriate value like 0.00
when the item is fully discounted.
Actual results:
row_total_incl_tax
returns a near-zero floating point value like 3.5527136788005e-15
, which is not appropriate for currency display.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- ÃÛ¶¹ÊÓÆµ Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.