• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_report_helper.php
  • Класс: \CCrmReportHelperBase
  • Вызов: CCrmReportHelperBase::formatResultsTotal
static function formatResultsTotal(&$total, &$columnInfo, &$customChartTotal = null)
{
	// HACK: detect if 'report.view' component is rendering excel spreadsheet
	$isHtml = !(isset($_GET['EXCEL']) && $_GET['EXCEL'] === 'Y');

	foreach($total as $k => &$v)
	{
		if (preg_match('/_QUANTITY$/', $k))
		{
			$v = round(doubleval($v), 4);
		}
		elseif(preg_match('/_OPPORTUNITY$/', $k)
			|| preg_match('/_ACCOUNT$/', $k)
			|| preg_match('/_AMOUNT$/', $k)
			|| preg_match('/_PRICE$/', $k)
			|| preg_match('/_PRICE_WORK$/', $k)
			|| preg_match('/_PRICE_PAYED$/', $k)
			|| preg_match('/_PRICE_CANCELED$/', $k))
		{
			$v = self::MoneyToString(doubleval($v), $isHtml);
		}
	}

	parent::formatResultsTotal($total, $columnInfo);
}