• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/stat/statistics.php
  • Класс: BitrixSenderStatStatistics
  • Вызов: Statistics::getCounterCalculation
static function getCounterCalculation($code, $value, $percentBase = 0)
{
	$value = (float) $value;
	$percentValue = $percentBase > 0 ? $value / $percentBase : 0;

	return array(
		'CODE' => $code,
		'VALUE' => round($value, 3),
		'VALUE_DISPLAY' => self::formatNumber($value, 1),
		'PERCENT_VALUE' => round($percentValue, $code == 'UNSUB' ? 3 : 3),
		'PERCENT_VALUE_DISPLAY' => self::formatNumber($percentValue * 100, $code == 'UNSUB' ? 1 : 1),
	);
}