• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_main.php
  • Класс: CVoxImplantMain
  • Вызов: CVoxImplantMain::formatMoney
static function formatMoney($amount)
{
	$account = new CVoxImplantAccount();
	$currency = $account->GetAccountCurrency();
	if($currency == 'RUR')
	{
		$currency = 'RUB';
	}

	if(!$currency)
		return (string)$amount;

	if(BitrixMainLoader::includeModule('currency'))
	{
		//TODO: temporary fix
		$result = CCurrencyLang::CurrencyFormat($amount, $currency);
		if (!BitrixMainLoader::includeModule('bitrix24'))
		{
			$result = htmlspecialcharsEx($result);
		}
		return $result;
	}
	else
	{
		return $amount . ' ' . $currency;
	}
}