2.4.4 no Longer Displays 0.00 Sales Invoices in customer_inquiry.php. Fixed. $Braath...
[fa-stable.git] / includes / current_user.inc
index 20ce1e0fc9599f8d178f34c07146603497ba18e2..23887cb65d62d995a7bfce41ba30e2b0c2d651dd 100644 (file)
@@ -353,7 +353,7 @@ function price_decimal_format($number, &$dec)
        if ($pos !== false)
        {
                $len = strlen(substr($str, $pos + 1));
-               if ($len > $dec)
+               if ($len > $dec && $len < ini_get('precision')-3)
                        $dec = $len;
        }
        return number_format2($number, $dec);
@@ -732,6 +732,8 @@ function recalculate_cols(&$cols)
 
 function flush_dir($path, $wipe = false) 
 {
+       if (!file_exists($path))
+               return;
        $dir = @opendir($path);
        if(!$dir)
                return;