From f02672c92acfa16a3cd8c1184ff870ce74e5012d Mon Sep 17 00:00:00 2001 From: pzinovkin Date: Tue, 10 Nov 2009 02:36:35 +0000 Subject: [PATCH] currency configuration, #14 git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@108 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/Format.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/Format.class.php b/classes/Format.class.php index cc505fd..e028b1a 100644 --- a/classes/Format.class.php +++ b/classes/Format.class.php @@ -35,6 +35,11 @@ class Format { return self::$currency_symbol; } + + public static function setCurrencySymbol($symbol) + { + self::$currency_symbol = $symbol; + } /** * Форматируем int в денежный формат @@ -46,7 +51,7 @@ class Format static public function int2money($int = 0, $currency = false, $show_decimals = true) { $money = number_format($int/100, ($show_decimals) ? self::$frac_digits : 0, self::$decimal_point, ' '); - return $money . (($currency) ? ' '.self::$currency_symbol : ''); + return $money . (($currency) ? ' ' . self::$currency_symbol : ''); } static public function money2int($money)