Commit 1498a94f authored by neo's avatar neo

[Bugfix] fixed eval to string and to bigdeciaml

parent ffcc6a16
...@@ -109,7 +109,10 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -109,7 +109,10 @@ public class BB extends FunctionBase implements FreeRefFunction {
((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString()); ((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString());
if (!dss.isEmpty()) cellValue = dss.get(0).getAmount(); if (!dss.isEmpty()) cellValue = dss.get(0).getAmount();
} else { } else {
cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval)); String evalStr = OperandResolver.coerceValueToString(eval);
logger.debug("[BB_debug] eval other cell value {}", evalStr);
cellValue = new BigDecimal(evalStr).setScale(4,
BigDecimal.ROUND_HALF_DOWN);
if (!dss.isEmpty()) if (!dss.isEmpty())
cellValue = cellValue.add(dss.get(0).getAmount()); cellValue = cellValue.add(dss.get(0).getAmount());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment