diff --git a/classes/Format.class.php b/classes/Format.class.php index de11d9a..65c1d2b 100644 --- a/classes/Format.class.php +++ b/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]; }