From 06c5aca2a1f19a0ecf48f2c0c71e3329219375fc Mon Sep 17 00:00:00 2001 From: Michael Larabel Date: Thu, 24 Apr 2008 13:33:18 -0400 Subject: A fix for showing decimal points when number divides cleanly --- pts-core/functions/pts-functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php index 40d2c2d..f508573 100644 --- a/pts-core/functions/pts-functions.php +++ b/pts-core/functions/pts-functions.php @@ -352,7 +352,10 @@ function pts_trim_double($double, $accuracy = 2) $return = explode(".", $double); - if(count($return) > 1) + if(count($return) == 1) + $return[1] = "00"; + + if(count($return) == 2) { $strlen = strlen($return[1]); -- cgit