|
@@ -1014,7 +1014,8 @@ public class SettlementManagementServiceImpl implements SettlementManagementServ
|
|
|
AcceptanceGoodsInfo acceptanceGoodsInfo = acceptanceGoodsInfoService.getById(settlementGoodsInfo.getAcceptanceGoodsInfoId());
|
|
|
number = number + 1;
|
|
|
sum = sum.add(acceptanceGoodsInfo.getGoodsQuantity());
|
|
|
- sumPrice = sumPrice.add(settlementGoodsInfo.getPurchaseTotalPrice().setScale(2, RoundingMode.HALF_UP));
|
|
|
+ BigDecimal purchasePrice = acceptanceGoodsInfo.getPurchasePrice() == null ? BigDecimal.ZERO : acceptanceGoodsInfo.getPurchasePrice();
|
|
|
+ sumPrice = sumPrice.add(purchasePrice.multiply(acceptanceGoodsInfo.getGoodsQuantity()));
|
|
|
|
|
|
RowRenderData data = Rows.of(indexNumber + "", acceptanceGoodsInfo.getGoodsName(), acceptanceGoodsInfo.getGoodsFactory()
|
|
|
, acceptanceGoodsInfo.getGoodsType(), acceptanceGoodsInfo.getGoodsMaterial(), acceptanceGoodsInfo.getGoodsUnit()
|
|
@@ -1028,7 +1029,7 @@ public class SettlementManagementServiceImpl implements SettlementManagementServ
|
|
|
indexNumber++;
|
|
|
}
|
|
|
|
|
|
- RowRenderData foot = Rows.of("合计", null, null, null, null, null, sum.toString(), null, sumPrice.toString())
|
|
|
+ RowRenderData foot = Rows.of("合计", null, null, null, null, null, sum.toString(), null, sumPrice.setScale(2, RoundingMode.HALF_UP).toString())
|
|
|
.center()
|
|
|
.textFontFamily("宋体")
|
|
|
.textFontSize(10)
|