Percentage::processLogic

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Percentage
  4. processLogic
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Field/Percentage.php
  • Класс: Bitrix\Crm\Field\Percentage
  • Вызов: Percentage::processLogic
protected function processLogic(Item $item, Context $context = null): Result
{
	$value = $item->get($this->getName());

	if ($value > 100)
	{
		$item->set($this->getName(), 100);
	}
	elseif ($value < 0)
	{
		$item->set($this->getName(), 0);
	}

	return new Result();
}

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