From d7f22c48408bf10202614b93c49f82be280b03c9 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Fri, 31 Jan 2020 15:09:27 +1030 Subject: [PATCH] GH-26597: Also calculate tax discount compensation amount when prices are configured to be exclusive of tax. --- .../Tax/Model/Calculation/AbstractAggregateCalculator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Tax/Model/Calculation/AbstractAggregateCalculator.php b/app/code/Magento/Tax/Model/Calculation/AbstractAggregateCalculator.php index 939facd02c02d..acd2fd43a7e15 100644 --- a/app/code/Magento/Tax/Model/Calculation/AbstractAggregateCalculator.php +++ b/app/code/Magento/Tax/Model/Calculation/AbstractAggregateCalculator.php @@ -155,6 +155,7 @@ protected function calculateWithTaxNotInPrice(QuoteDetailsItemInterface $item, $ $rowTax = array_sum($rowTaxes); $rowTaxBeforeDiscount = array_sum($rowTaxesBeforeDiscount); $rowTotalInclTax = $rowTotal + $rowTaxBeforeDiscount; + $discountTaxCompensationAmount = $rowTaxBeforeDiscount - $rowTax; $priceInclTax = $rowTotalInclTax / $quantity; if ($round) {