Now non decimal numbers have all right zeros. Ticket #4254

This commit is contained in:
Arturo Gonzalez 2016-12-01 08:55:44 +01:00
parent 635d59a2d2
commit bba75aa166

View File

@ -2664,7 +2664,13 @@ function pandora_setlocale() {
} }
function remove_right_zeros ($value) { function remove_right_zeros ($value) {
$value_to_return = rtrim($value, "0"); $is_decimal = explode(".", $value);
return rtrim($value_to_return, "."); if (isset($is_decimal[1])) {
$value_to_return = rtrim($value, "0");
return rtrim($value_to_return, ".");
}
else {
return $value;
}
} }
?> ?>