money default in rubles
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@43 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user