/** * @param AmountInterface $amount * @return float */ public function getSavePercent(AmountInterface $amount) { return round($amount->getBaseAmount()); }
/** * @param AmountInterface $amount * @return float */ public function getSavePercent(AmountInterface $amount) { return ceil(100 - 100 / $this->priceInfo->getPrice(BasePrice::PRICE_CODE)->getAmount()->getBaseAmount() * $amount->getBaseAmount()); }