Exemple #1
0
 public static function roundPrice($value, $precision = 0)
 {
     static $method = null;
     if ($method == null) {
         $method = (int) JeproshopSettingModelSetting::getValue('price_round_mode');
     }
     if ($method == COM_JEPROSHOP_ROUND_UP_PRICE) {
         return JeproshopTools::priceCeil($value, $precision);
     } elseif ($method == COM_JEPROSHOP_ROUND_DOWN_PRICE) {
         return JeproshopTools::priceFloor($value, $precision);
     }
     return round($value, $precision);
 }