• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/productrow.php
  • Класс: Bitrix\Crm\ProductRow
  • Вызов: ProductRow::normalizeDiscount
protected function normalizeDiscount(Result $result): void
{
	if (!Discount::isDefined($this->getDiscountTypeId()))
	{
		$this->setDiscountTypeId(Discount::PERCENTAGE);
		$this->setDiscountRate(0.0);
	}

	if ($this->getDiscountTypeId() === Discount::PERCENTAGE)
	{
		$this->normalizeDiscountForPercentage($result);
	}
	elseif ($this->getDiscountTypeId() === Discount::MONETARY)
	{
		$this->normalizeDiscountForMonetary($result);
	}
}