Skip to content

Commit

Permalink
ENGCOM-4360: As low as displays incorrect pricing on category page, t…
Browse files Browse the repository at this point in the history
…ax appears to be added twice #21383 #21395
  • Loading branch information
sidolov authored Feb 28, 2019
2 parents 51df236 + b2fbf13 commit 2ec994e
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ public function __construct(CalculatorInterface $calculator)
}

/**
* Get raw value of "as low as" as a minimal among tier prices
* {@inheritdoc}
* Get raw value of "as low as" as a minimal among tier prices{@inheritdoc}
*
* @param SaleableInterface $saleableItem
* @return float|null
*/
public function getValue(SaleableInterface $saleableItem)
{
Expand All @@ -49,15 +51,17 @@ public function getValue(SaleableInterface $saleableItem)
}

/**
* Return calculated amount object that keeps "as low as" value
* {@inheritdoc}
* Return calculated amount object that keeps "as low as" value{@inheritdoc}
*
* @param SaleableInterface $saleableItem
* @return AmountInterface|null
*/
public function getAmount(SaleableInterface $saleableItem)
{
$value = $this->getValue($saleableItem);

return $value === null
? null
: $this->calculator->getAmount($value, $saleableItem);
: $this->calculator->getAmount($value, $saleableItem, 'tax');
}
}

0 comments on commit 2ec994e

Please sign in to comment.