Commit 4843ff5774e25155a68d6f421403eb7e090da7b9
1 parent
1ad8b529
fix(erp): 修复销售出库和退货其他费用计算
Showing
2 changed files
with
2 additions
and
2 deletions
yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java
| ... | ... | @@ -148,7 +148,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService { |
| 148 | 148 | saleOut.setDiscountPercent(BigDecimal.ZERO); |
| 149 | 149 | } |
| 150 | 150 | saleOut.setDiscountPrice(MoneyUtils.priceMultiplyPercent(saleOut.getTotalPrice(), saleOut.getDiscountPercent())); |
| 151 | - saleOut.setTotalPrice(saleOut.getTotalPrice().subtract(saleOut.getDiscountPrice().add(saleOut.getOtherPrice()))); | |
| 151 | + saleOut.setTotalPrice(saleOut.getTotalPrice().subtract(saleOut.getDiscountPrice()).add(saleOut.getOtherPrice())); | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | private void updateSaleOrderOutCount(Long orderId) { | ... | ... |
yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java
| ... | ... | @@ -148,7 +148,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService { |
| 148 | 148 | saleReturn.setDiscountPercent(BigDecimal.ZERO); |
| 149 | 149 | } |
| 150 | 150 | saleReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(saleReturn.getTotalPrice(), saleReturn.getDiscountPercent())); |
| 151 | - saleReturn.setTotalPrice(saleReturn.getTotalPrice().subtract(saleReturn.getDiscountPrice().add(saleReturn.getOtherPrice()))); | |
| 151 | + saleReturn.setTotalPrice(saleReturn.getTotalPrice().subtract(saleReturn.getDiscountPrice()).add(saleReturn.getOtherPrice())); | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | private void updateSaleOrderReturnCount(Long orderId) { | ... | ... |