|
|
@ -1965,7 +1965,9 @@ public class PageController { |
|
|
if ("-1".equals(unit)) { |
|
|
if ("-1".equals(unit)) { |
|
|
// 如果是基础单位
|
|
|
// 如果是基础单位
|
|
|
if (inventoryById.getPrice() != null) { |
|
|
if (inventoryById.getPrice() != null) { |
|
|
sumPrice += (inventoryById.getPrice() * recordMinP.getQuantity()); |
|
|
BigDecimal bd = BigDecimal.valueOf(inventoryById.getPrice() * recordMinP.getQuantity()); |
|
|
|
|
|
double v = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
|
|
sumPrice += v; |
|
|
} else { |
|
|
} else { |
|
|
sumPrice += 0.0; |
|
|
sumPrice += 0.0; |
|
|
} |
|
|
} |
|
|
@ -1982,7 +1984,9 @@ public class PageController { |
|
|
// 获取当前拆单记录与基础单位的进制
|
|
|
// 获取当前拆单记录与基础单位的进制
|
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
if (inventoryById.getPrice() != null) { |
|
|
if (inventoryById.getPrice() != null) { |
|
|
sumPrice += (inventoryById.getPrice() / scale * recordMinP.getQuantity()); |
|
|
BigDecimal bd = BigDecimal.valueOf((inventoryById.getPrice() / scale * recordMinP.getQuantity())); |
|
|
|
|
|
double v = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
|
|
sumPrice += v; |
|
|
} else { |
|
|
} else { |
|
|
sumPrice += 0.0; |
|
|
sumPrice += 0.0; |
|
|
} |
|
|
} |
|
|
|