mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Now non decimal numbers have all right zeros. Ticket #4254
(cherry picked from commit bba75aa1669813b2be4db4d201c72efb13ab698f)
This commit is contained in:
parent
cce7a397f4
commit
8cfb05fc99
@ -2656,7 +2656,13 @@ function pandora_setlocale() {
|
||||
}
|
||||
|
||||
function remove_right_zeros ($value) {
|
||||
$value_to_return = rtrim($value, "0");
|
||||
return rtrim($value_to_return, ".");
|
||||
$is_decimal = explode(".", $value);
|
||||
if (isset($is_decimal[1])) {
|
||||
$value_to_return = rtrim($value, "0");
|
||||
return rtrim($value_to_return, ".");
|
||||
}
|
||||
else {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user