ACSD-61200: Fixes discount tax compensation in sales total calculations

The ACSD-61200 patch fixes the issue where Discount Tax Compensation Amount and Shipping Discount Tax Compensation Amount are missing from Total Amount and Total Amount Actual calculations, resulting in discrepancies between sales order data and coupon report data. This patch is available when the Quality Patches Tool (QPT) 1.1.54 is installed. The patch ID is ACSD-61200. Please note that the issue is scheduled to be fixed in Adobe Commerce version 2.4.8.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p3
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe 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

Inaccuracies in the sales order and coupon report data due to missing Discount Tax Compensation Amount and Shipping Discount Tax Compensation Amount in sales total calculations.

Steps to reproduce:

  1. Create a Tax Zone and a Tax Rule.

  2. Set the following tax configurations:

    • Tax Class for Shipping = Taxable Goods
    • Catalog Prices = Including Tax
    • Shipping Prices = Including Tax
    • Apply Discount on Prices = Including Tax
    • Display Product Prices in Catalog = Including Tax
    • Display Shipping Prices = Including Tax
  3. Update the following display settings for Orders, Invoices, and Credit memos:

    • Display Prices = Including Tax
    • Display Subtotal= Including Tax
    • Display Shipping Amount = Including Tax
  4. Create a Cart Price Rule with a coupon for a 10% discount.

  5. Complete an order using the coupon and generate an invoice and shipment.

  6. Go to Reports > Sales > Coupons and generate a report.

  7. Compare the data in the order summary to that of the report.

Expected results:

The Total Amount and Total Amount Actual calculations include both Discount Tax Compensation Amount and Shipping Discount Tax Compensation Amount, matching the order summary with the report data.

Actual results:

Sales order data and coupon report data do not match because the Discount Tax Compensation Amount and Shipping Discount Tax Compensation Amount are missing from calculations.

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:

Quality Patches Tool released: a new tool to self-serve quality patches in the Tools guide.

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