|
@ -36,6 +36,11 @@ class Format |
|
|
return self::$currency_symbol; |
|
|
return self::$currency_symbol; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static function setCurrencySymbol($symbol) |
|
|
|
|
|
{ |
|
|
|
|
|
self::$currency_symbol = $symbol; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Форматируем int в денежный формат |
|
|
* Форматируем int в денежный формат |
|
|
* |
|
|
* |
|
@ -46,7 +51,7 @@ class Format |
|
|
static public function int2money($int = 0, $currency = false, $show_decimals = true) |
|
|
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, ' '); |
|
|
$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) |
|
|
static public function money2int($money) |
|
|