Skip to content

Commit

Permalink
Fix salesagility#10580 - Import float values ​​with correct decimal s…
Browse files Browse the repository at this point in the history
…eparator
  • Loading branch information
SinergiaCRM committed Nov 19, 2024
1 parent e572230 commit 40a6651
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions include/SugarFields/Fields/Float/SugarFieldFloat.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,10 @@ public function importSanitize(
$focus,
ImportFieldSanitize $settings
) {
$value = str_replace($settings->num_grp_sep, "", $value);
$dec_sep = $settings->dec_sep;
if ($dec_sep != '.') {
$value = str_replace($dec_sep, ".", $value);
if (isset($vardef['len'])) {
// check for field length
$value = sugar_substr($value, $vardef['len']);
}
if (!is_numeric($value)) {
return false;
}

return $value;
}
}

0 comments on commit 40a6651

Please sign in to comment.