EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix schema diff for decimal
Yuri Kuznetsov36f03f0a766b
diff --git a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.phpindex 4210ab5285..e3428c1ba8 100644--- a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php+++ b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php@@ -85,8 +85,10 @@ class Currency implements FieldConverter$defaultValue = $fieldDefs->getParam(AttributeParam::DEFAULT);- if ($defaultValue !== null) {- $amountDefs = $amountDefs->withParam(AttributeParam::DEFAULT, (string) $defaultValue);+ if (is_int($defaultValue) || is_float($defaultValue)) {+ $defaultValue = number_format($defaultValue, $scale, '.', '');++ $amountDefs = $amountDefs->withParam(AttributeParam::DEFAULT, $defaultValue);}}