EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix decimal not storable
Yuriiab639c291316
diff --git a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Decimal.php b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Decimal.phpindex 1419a04d3b..37150b5b6f 100644--- a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Decimal.php+++ b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Decimal.php@@ -50,6 +50,7 @@ class Decimal implements FieldConverter$dbType = $fieldDefs->getParam(FieldParam::DB_TYPE) ?? Types::DECIMAL;$precision = $fieldDefs->getParam(FieldParam::PRECISION) ?? self::DEFAULT_PRECISION;$scale = $fieldDefs->getParam(FieldParam::SCALE) ?? self::DEFAULT_SCALE;+ $notStorable = $fieldDefs->getParam(FieldParam::NOT_STORABLE);$defs = AttributeDefs::create($name)->withType(AttributeType::VARCHAR)@@ -57,6 +58,10 @@ class Decimal implements FieldConverter->withParam(AttributeParam::PRECISION, $precision)->withParam(AttributeParam::SCALE, $scale);+ if ($notStorable) {+ $defs = $defs->withParam(AttributeParam::NOT_STORABLE, $notStorable);+ }+return EntityDefs::create()->withAttribute($defs);}