• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/Calc/Libs/StringLib.php
  • Класс: BitrixBizprocCalcLibsStringLib
  • Вызов: StringLib::callNumberFormat
public function callNumberFormat(Arguments $args)
{
	$number = (float)$args->getFirstSingle();
	$decimals = (int)($args->getSecond() ?: 0);
	$decPoint = $args->getThird();

	if (!is_scalar($decPoint))
	{
		$decPoint = '.';
	}
	$decPoint = (string)$decPoint;

	$thousandsSeparator = $args->getArg(3);
	if (!is_scalar($thousandsSeparator))
	{
		$thousandsSeparator = ',';
	}
	$thousandsSeparator = (string)$thousandsSeparator;

	return number_format($number, $decimals, $decPoint, $thousandsSeparator);
}