Commit a5fbad31d1054501f99d14badbe323c7d921d8cb
1 parent
90ea7b95
【修复】ERP:采购金额计算逻辑错误
Showing
2 changed files
with
2 additions
and
2 deletions
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseInServiceImpl.java
| @@ -140,7 +140,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService { | @@ -140,7 +140,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService { | ||
| 140 | purchaseIn.setDiscountPercent(BigDecimal.ZERO); | 140 | purchaseIn.setDiscountPercent(BigDecimal.ZERO); |
| 141 | } | 141 | } |
| 142 | purchaseIn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseIn.getTotalPrice(), purchaseIn.getDiscountPercent())); | 142 | purchaseIn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseIn.getTotalPrice(), purchaseIn.getDiscountPercent())); |
| 143 | - purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice().add(purchaseIn.getOtherPrice()))); | 143 | + purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice()).add(purchaseIn.getOtherPrice())); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | private void updatePurchaseOrderInCount(Long orderId) { | 146 | private void updatePurchaseOrderInCount(Long orderId) { |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseReturnServiceImpl.java
| @@ -136,7 +136,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService { | @@ -136,7 +136,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService { | ||
| 136 | purchaseReturn.setDiscountPercent(BigDecimal.ZERO); | 136 | purchaseReturn.setDiscountPercent(BigDecimal.ZERO); |
| 137 | } | 137 | } |
| 138 | purchaseReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseReturn.getTotalPrice(), purchaseReturn.getDiscountPercent())); | 138 | purchaseReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseReturn.getTotalPrice(), purchaseReturn.getDiscountPercent())); |
| 139 | - purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice().add(purchaseReturn.getOtherPrice()))); | 139 | + purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice()).add(purchaseReturn.getOtherPrice())); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | private void updatePurchaseOrderReturnCount(Long orderId) { | 142 | private void updatePurchaseOrderReturnCount(Long orderId) { |