ÃÛ¶¹ÊÓÆµ

[PaaS only]{class="badge informative" title="Applies to ÃÛ¶¹ÊÓÆµ Commerce on Cloud projects (ÃÛ¶¹ÊÓÆµ-managed PaaS infrastructure) and on-premises projects only."}

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
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your ÃÛ¶¹ÊÓÆµ Commerce version, update the 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:

  1. 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.
  2. 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.
  3. 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.
  4. Go to Stores > Settings > Configuration > Sales > Tax > and configure tax settings.
  5. Enable free shipping. Go to Stores > Settings > Configuration > Sales > Delivery Methods > Free Shipping. Set Enabled to Yes and adjust settings.
  6. Go to the product page and select Add to Cart. Go to the shopping cart and apply the coupon code.
  7. Place the order with the applicable tax zone.
  8. Generate an admin token (API) via REST API.
  9. Retrieve order details via REST API.
  10. 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:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3