Skip to content

Commit

Permalink
added new types
Browse files Browse the repository at this point in the history
  • Loading branch information
ainaraRT committed Jan 18, 2024
1 parent 1cbc383 commit ca9a2b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/AOW_Actions/actions/actionComputeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ public function run_action(SugarBean $bean, $params = array(), $in_save = false)
} else {
$value = $calculator->calculateFormula($formulaContents[$i]);
$fieldType = $bean->field_defs[$formulas[$i]]['type'] ?? 'string';
if (in_array($fieldType, ['float', 'decimal', 'currency'])) {
if (in_array($fieldType, ['float', 'decimal', 'currency', 'double'])) {
$value = (float) $value;
}
elseif ($fieldType === 'int') {
elseif (in_array($fieldType, ['int', 'uint', 'ulong', 'long', 'short', 'tinyint'])) {
$value = (int) $value;
}
$bean->{$formulas[$i]} = $value;
}
}
// End STIC-Custom 20240110
// End STIC-Custom 20240118

if ($in_save) {
global $current_user;
Expand Down

0 comments on commit ca9a2b7

Please sign in to comment.