Skip to content

Commit

Permalink
Fix salesagility#10425 - Value of "currency_id" in custom table chang…
Browse files Browse the repository at this point in the history
…es from NULL to an empty string when saving
  • Loading branch information
serhiisamko091184 committed Oct 11, 2024
1 parent e88c507 commit 3492957
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/DynamicFields/DynamicField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
* Copyright (C) 2011 - 2024 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
Expand Down Expand Up @@ -453,7 +453,9 @@ public function save($isUpdate)
if (isset($this->bean->$name)) {
$quote = "'";

if (in_array($field['type'], array('int', 'float', 'double', 'uint', 'ulong', 'long', 'short', 'tinyint', 'currency', 'decimal'))) {
if (in_array($field['type'], [
'int', 'float', 'double', 'uint', 'ulong', 'long', 'short', 'tinyint', 'currency', 'currency_id', 'decimal',
])) {
$quote = '';
if (!isset($this->bean->$name) || !is_numeric($this->bean->$name)) {
if (!empty($field['required'])) {
Expand Down

0 comments on commit 3492957

Please sign in to comment.