ProductRow::normalizeDiscount

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ProductRow
  4. normalizeDiscount
  • Модуль: 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);
	}
}

Добавить комментарий