Vinoteca: модуль, шаблон и компоненты интернет-магазина вина на 1С-Битрикс
This commit is contained in:
commit
bb7d8af290
469 files changed
+26426
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Jinove\Vinoteca;
|
||||
|
||||
use Bitrix\Main\Loader;
|
||||
|
||||
final class Money
|
||||
{
|
||||
public static function format(float $amount, string $currency): string
|
||||
{
|
||||
if (!Loader::includeModule("currency")) {
|
||||
return (string)$amount;
|
||||
}
|
||||
|
||||
return trim(html_entity_decode(strip_tags((string)\CCurrencyLang::CurrencyFormat($amount, $currency)), ENT_QUOTES | ENT_HTML5, "UTF-8"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user