From 36f03f0a766bef8237b1b57f43e645e38abdd1fd Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 26 Oct 2025 12:58:27 +0200 Subject: [PATCH] fix schema diff for decimal --- .../Core/Utils/Database/Orm/FieldConverters/Currency.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php index 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); } }