ProductRow::tryNormalizeCurrentMeasure

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ProductRow
  4. tryNormalizeCurrentMeasure
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/productrow.php
  • Класс: Bitrix\Crm\ProductRow
  • Вызов: ProductRow::tryNormalizeCurrentMeasure
protected function tryNormalizeCurrentMeasure(): bool
{
	if (empty($this->getMeasureCode()))
	{
		return false;
	}

	$currentMeasure = Measure::getMeasureByCode($this->getMeasureCode());
	if (empty($currentMeasure))
	{
		//measure with such a code not found, value is invalid
		return false;
	}

	//normalize measure name
	$this->setMeasureName($currentMeasure['SYMBOL']);

	return true;
}

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