fix schema diff for decimal

This commit is contained in:
Yuri Kuznetsov
2025-10-26 12:58:27 +02:00
parent a141a664c6
commit 36f03f0a76
@@ -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);
}
}