Commit 3f7c8759 authored by 张永's avatar 张永

1

parent 4d207ea7
...@@ -206,7 +206,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -206,7 +206,7 @@ public class GoodsServiceImpl implements GoodsService {
} }
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice"); BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice"); BigDecimal nRealSalePrice = (BigDecimal)detail.get("nApSalePrice");
BigDecimal nProfitMargin = BigDecimal.ZERO; BigDecimal nProfitMargin = BigDecimal.ZERO;
if(nRealSalePrice != null && nRealSalePrice.compareTo(BigDecimal.ZERO) != 0) { if(nRealSalePrice != null && nRealSalePrice.compareTo(BigDecimal.ZERO) != 0) {
nProfitMargin = nMarketPrice.subtract(nRealSalePrice).multiply(new BigDecimal(100)).divide(nRealSalePrice, 2, BigDecimal.ROUND_HALF_UP); nProfitMargin = nMarketPrice.subtract(nRealSalePrice).multiply(new BigDecimal(100)).divide(nRealSalePrice, 2, BigDecimal.ROUND_HALF_UP);
......
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