{"data":{"id":"ACSD-66120","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where GraphQL incorrectly displayed discount percentages and base prices when catalog prices were configured to include tax.","categories":["GraphQL","Price/Tax"],"components":["magento/module-catalog-graph-ql","magento/module-catalog-rule","magento/module-tax"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-70/acsd-66120","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-70/acsd-66120.md","blobSha":"370b0812f0faccc0d7aa2d60b39788d33efe4b4b","description":"GraphQL incorrectly displays discount percentages and base prices when catalog prices are configured to include tax. Due to rounding errors, the discount percentage shows as 19.99% instead of the configured 20%.","stepsToReproduce":"1. Go to Stores > Settings > Configuration > Catalog > Catalog > Price. 1. Set Catalog Price Scope to Website. 1. Go to Stores > Settings > Configuration > Sales > Tax > Calculation Settings. 1. Set Tax Calculation Method Based On to Unit Price. 1. Set Catalog Prices to Including Tax. 1. Set Apply Discount On Prices to Including Tax. 1. Go to Stores > Settings > Configuration > Sales > Tax > Default Tax Destination Calculation. 1. Set Default Country to France. 1. Go to Stores > Tax Zones and Rates > Add new Tax Rate. 1. Enter any name in the Tax Identifier field. 1. Enter an asterisk (*) in the Zip/Post Code field. 1. Set Country to France. 1. Enter 20.000000 in the Rate Percent field. 1. Click Save. 1. Go to Stores > Tax Rules > Add New Tax Rule. 1. Enter any name in the Name field. 1. Set Tax Rate to rate added in previous step. 1. Go to Catalog > Products > Add Product. 1. Enter test in the Product Name field. 1. Enter test in the SKU field. 1. Enter 82.65 in the Price field. 1. Set Tax Class to Taxable Goods. 1. Enter 100 in the Quantity field. 1. Click Save. 1. Change scope to Default Store View. 1. Unset Use Default Value on Price. 1. Set Price to 68.87. 1. Unset Use Default Value on Tax Class. 1. Set Tax Class to Taxable goods. 1. Click Save. 1. Go to Marketing > Promotions > Catalog Price Rule > Add New Rule. 1. Enter any name in the Rule Name field. 1. Set Active to Yes. 1. Set Website to Main Website. 1. Set Customer Groups to all 1. Under Actions, set Apply to Apply as percentage of original. 1. Enter 20.000000 in the Discount Amount field. 1. Click Save. 1. Perform a full reindex: $ bin/magento index:reindex 1. Perform the following GraphQL query with Store: default set in the headers: query{ products(filter: {sku: {eq: \"test\"}}, sort: {name: ASC}) { items { name sku price_range { minimum_price { regular_price { value currency } final_price { value currency } discount { amount_off percent_off } } maximum_price { regular_price { value currency } final_price { value currency } discount { amount_off percent_off } } } } } }","introducedInQpt":"1.1.70","createdFor":["2.4.6-p9"],"documentedRange":"2.4.4 - 2.4.8-p2","scheduledFixRelease":"2.4.9"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.4 <2.4.9","path":"patches/os/ACSD-66120_2.4.6-p9.patch","blobSha":"0131d7e6ffc97f635a1167239efd149a12f6be0f","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-66120_2.4.6-p9.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-catalog-graph-ql/Model/Resolver/Product/Price/Discount.php","change":"modified","package":"magento/module-catalog-graph-ql"},{"path":"vendor/magento/module-catalog-rule/Model/Indexer/ProductPriceCalculator.php","change":"modified","package":"magento/module-catalog-rule"},{"path":"vendor/magento/module-catalog-rule/Pricing/Price/CatalogRulePrice.php","change":"modified","package":"magento/module-catalog-rule"},{"path":"vendor/magento/module-tax/Model/Calculation/UnitBaseCalculator.php","change":"modified","package":"magento/module-tax"}],"packages":["magento/module-catalog-graph-ql","magento/module-catalog-rule","magento/module-tax"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8","2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p15","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"magento-commerce":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8","2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p15","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8","2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p15","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"magento-commerce":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8","2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7","2.4.6-p15","2.4.6-p14","2.4.6-p13","2.4.6-p12","2.4.6-p11","2.4.6-p10","2.4.6-p9","2.4.6-p8","2.4.6-p7","2.4.6-p6","2.4.6-p5","2.4.6-p4","2.4.6-p3","2.4.6-p2","2.4.6-p1","2.4.6","2.4.5-p17","2.4.5-p16","2.4.5-p15","2.4.5-p14","2.4.5-p13","2.4.5-p12","2.4.5-p11","2.4.5-p10","2.4.5-p9","2.4.5-p8","2.4.5-p7","2.4.5-p6","2.4.5-p5","2.4.5-p4","2.4.5-p3","2.4.5-p2","2.4.5-p1","2.4.5","2.4.4-p18","2.4.4-p17","2.4.4-p16","2.4.4-p15","2.4.4-p14","2.4.4-p13","2.4.4-p12","2.4.4-p11","2.4.4-p10","2.4.4-p9","2.4.4-p8","2.4.4-p7","2.4.4-p6","2.4.4-p5","2.4.4-p4","2.4.4-p3","2.4.4-p2","2.4.4-p1","2.4.4"],"mage-os":[]},"conditions":{"and":[{"type":"config","path":"tax/calculation/apply_after_discount","match":"0"},{"type":"config","path":"tax/calculation/price_includes_tax","match":"1"},{"type":"config","path":"tax/calculation/algorithm","match":"UNIT_BASE_CALCULATION"}]},"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-66120 details"}