Browse Source

money default in rubles

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@43 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
pzinovkin 16 years ago
parent
commit
47e33759d8
  1. 6
      classes/Format.class.php

6
classes/Format.class.php

@ -47,7 +47,11 @@ class Format
static public function money2int($money)
{
if(!isset(self::$cache_money[$money])){
self::$cache_money[$money] = (int)str_replace(array('.', self::$decimal_point), '', $money);
if(!strstr($money, self::$decimal_point) && !strstr($money, '.')){
self::$cache_money[$money] = (int)$money * 100;
}else{
self::$cache_money[$money] = (int)str_replace(array('.', self::$decimal_point), '', $money);
}
}
return self::$cache_money[$money];
}

Loading…
Cancel
Save