Skip to content

Commit 5762462

Browse files
author
Robert He
committed
MAGETWO-43291: Incl tax prices on Product and catalog pages include tax on FPT
-- fixed merge issues
1 parent 17f69be commit 5762462

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

app/code/Magento/Weee/Observer/GetPriceConfigurationObserver.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,14 @@ private function insertWeeePrice($holder, $key, $weeeAttributes)
138138
*
139139
* @param int|null $storeId
140140
* @return string
141-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
142141
*/
143142
protected function getWhichCalcPriceToUse($storeId = null)
144143
{
145144
$calcPrice = 'finalPrice';
146-
147-
// Does catalog price include tax? (true, false)
148-
$isPriceIncludesTax = $this->weeeData->displayTotalsInclTax();
149-
// Price display configurations (DISPLAY_TYPE_EXCLUDING_TAX, DISPLAY_TYPE_INCLUDING_TAX, DISPLAY_TYPE_BOTH)
150-
$priceDisplayConfig = $this->weeeData->getTaxDisplayConfig();
151-
152-
if ($isPriceIncludesTax == true &&
153-
$priceDisplayConfig == \Magento\Tax\Model\Config::DISPLAY_TYPE_EXCLUDING_TAX &&
154-
$this->weeeData->typeOfDisplay([\Magento\Weee\Model\Tax::DISPLAY_EXCL_DESCR_INCL])) {
145+
if ($this->weeeData->isDisplayExcl($storeId) ||
146+
$this->weeeData->isDisplayExclDescIncl($storeId) ||
147+
($this->taxData->priceIncludesTax() && $this->taxData->displayPriceExcludingTax())
148+
) {
155149
$calcPrice = 'basePrice';
156150
}
157151
return $calcPrice;

0 commit comments

Comments
 (0)