Skip to content

Commit 13b0ffc

Browse files
committed
AC-13075: FPT value in cart page and product page are different for same configurations for a dynamic product
1 parent c871076 commit 13b0ffc

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

app/code/Magento/Tax/Model/Calculation/AbstractAggregateCalculator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ protected function calculateWithTaxNotInPrice(QuoteDetailsItemInterface $item, $
120120
if ($applyTaxAfterDiscount) {
121121
$deltaRoundingType = self::KEY_TAX_BEFORE_DISCOUNT_DELTA_ROUNDING;
122122
}
123-
124-
if ($round) {
123+
124+
if ($round && strpos($item->getCode(), 'weee') !== false) {
125125
$rowTaxPerRate = $this->calculationTool->round($rowTaxPerRate);
126126
} else {
127127
$rowTaxPerRate = $this->roundAmount($rowTaxPerRate, $taxId, false, $deltaRoundingType, $round, $item);

app/code/Magento/Tax/Test/Unit/Model/Calculation/TotalBaseCalculatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -60,7 +60,7 @@ public function testCalculateWithTaxInPriceNoRounding()
6060
public function testCalculateWithTaxNotInPrice()
6161
{
6262
$this->initTotalBaseCalculator();
63-
$this->totalBaseCalculator->expects($this->exactly(2))
63+
$this->totalBaseCalculator->expects($this->exactly(1))
6464
->method('deltaRound')->willReturn(0);
6565
$this->initMocks(false);
6666

dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Tax\Model;
77

@@ -1397,10 +1397,10 @@ public static function calculateTaxRowBasedDataProvider()
13971397
'weee1-Recycling Fee' => [
13981398
'code' => 'weee1-Recycling Fee',
13991399
'row_tax' => 0.57,
1400-
'price' => 7,
1401-
'price_incl_tax' => 7.57,
1402-
'row_total' => 7,
1403-
'row_total_incl_tax' => 7.57,
1400+
'price' => 7.0,
1401+
'price_incl_tax' => 7.58,
1402+
'row_total' => 7.0,
1403+
'row_total_incl_tax' => 7.58,
14041404
'type' => 'weee',
14051405
'tax_percent' => 8.25,
14061406
'discount_tax_compensation_amount' => 0,

0 commit comments

Comments
 (0)