- fixed issue with new table skips decimals;

This commit is contained in:
Vitalii Kiiko
2025-01-28 15:33:21 +01:00
parent 7cf1b044be
commit 2187e4a36d
5 changed files with 11 additions and 9 deletions

View File

@@ -34,6 +34,7 @@ import {
import renderHtmlContent from '../../helpers/renderHtmlContent';
import renderWithDataVars from '../../helpers/renderWithDataVars';
import getTokens from '../../helpers/getTokens';
import parseCommaDecimal from '../../helpers/parseCommaDecimal';
const BandoFormsPreview = () => {
const { id, formId } = useParams();
@@ -105,7 +106,7 @@ const BandoFormsPreview = () => {
context = getTokens(formula.value)
.filter(v => !['false', 'null', 'true'].includes(v))
.reduce((acc, cur) => {
acc[cur] = isNil(context[cur]) ? 0 : parseFloat(context[cur]);
acc[cur] = isNil(context[cur]) ? 0 : parseCommaDecimal(context[cur]);
return acc;
}, context);
const mathFormula = renderWithDataVars(formula.value, context);