Commit f83eef4c authored by neo's avatar neo

[Bugfix] fixed bb cell value not correct

parent 378c4f12
......@@ -132,14 +132,17 @@ public class BB extends FunctionBase implements FreeRefFunction {
nullCellDto.extractFromGroup(bo, curPeriod, cellData, cellTemplateData);
if (dss.isEmpty())
MyAsserts.assertNotNull(cellData.getData(), Exceptions.BB_CELL_DATA_NULL);
else cellValue = dss.get(0).getAmount();
if (cellData.getData()!=null) {
cellValue = cellValue.add( new BigDecimal(cellData.getData()).setScale(4,
if (cellData.getData() == null && !dss.isEmpty()) {
cellValue = dss.get(0).getAmount();
} else if (cellData.getData() != null && dss.isEmpty()) {
cellValue = new BigDecimal(cellData.getData()).setScale(4,
BigDecimal.ROUND_HALF_DOWN);
} else if (cellData.getData() != null && !dss.isEmpty()) {
cellValue = dss.get(0).getAmount().add(new BigDecimal(cellData.getData()).setScale(4,
BigDecimal.ROUND_HALF_DOWN));
}
} else throw Exceptions.BB_CELL_DATA_NULL;
nullCellDto.setAmount(cellValue);
if (rootBo != null) {
rootBo.putPeriodCellTempate(curPeriod.getCurPeriod(), Long.parseLong(cellTemplateData.getCellTemplateId()));
......
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