• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/handler/lead.php
  • Класс: Bitrix\Crm\Integration\Report\Handler\Lead
  • Вызов: Lead::getSingleData
public function getSingleData()
{
	$calculatedData = $this->getCalculatedData();
	$result = [
		'value' => $calculatedData['withoutGrouping'],
	];

	$calculateValue = $this->getFormElement('calculate')->getValue();
	switch ($calculateValue)
	{
		case self::WHAT_WILL_CALCULATE_LEAD_CONVERSION:
		case self::WHAT_WILL_CALCULATE_LEAD_LOSES:
			$result['config']['unitOfMeasurement'] = '%';
			$result['value'] = round($result['value'], 2);
			break;
	}
	return $result;
}