From a141a664c6d0bfe6527ac2bcd9a1231cf1a3b4ab Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 26 Oct 2025 12:38:06 +0200 Subject: [PATCH] default decimal to string --- .../Core/Utils/Database/Orm/FieldConverters/Currency.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php index 2cb8ef296b..4210ab5285 100644 --- a/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php +++ b/application/Espo/Core/Utils/Database/Orm/FieldConverters/Currency.php @@ -82,6 +82,12 @@ class Currency implements FieldConverter ->withDbType($dbType) ->withParam(AttributeParam::PRECISION, $precision) ->withParam(AttributeParam::SCALE, $scale); + + $defaultValue = $fieldDefs->getParam(AttributeParam::DEFAULT); + + if ($defaultValue !== null) { + $amountDefs = $amountDefs->withParam(AttributeParam::DEFAULT, (string) $defaultValue); + } } if ($fieldDefs->isNotStorable()) {