Merge pull request #563 from zhenxi-he/master

【fix】ERP:采购金额计算逻辑错误
This commit is contained in:
芋道源码 2024-06-22 08:50:17 +08:00 committed by GitHub
commit cd99a369e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
purchaseIn.setDiscountPercent(BigDecimal.ZERO); purchaseIn.setDiscountPercent(BigDecimal.ZERO);
} }
purchaseIn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseIn.getTotalPrice(), purchaseIn.getDiscountPercent())); purchaseIn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseIn.getTotalPrice(), purchaseIn.getDiscountPercent()));
purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice().add(purchaseIn.getOtherPrice()))); purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice()).add(purchaseIn.getOtherPrice()));
} }
private void updatePurchaseOrderInCount(Long orderId) { private void updatePurchaseOrderInCount(Long orderId) {

View File

@ -136,7 +136,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
purchaseReturn.setDiscountPercent(BigDecimal.ZERO); purchaseReturn.setDiscountPercent(BigDecimal.ZERO);
} }
purchaseReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseReturn.getTotalPrice(), purchaseReturn.getDiscountPercent())); purchaseReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseReturn.getTotalPrice(), purchaseReturn.getDiscountPercent()));
purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice().add(purchaseReturn.getOtherPrice()))); purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice()).add(purchaseReturn.getOtherPrice()));
} }
private void updatePurchaseOrderReturnCount(Long orderId) { private void updatePurchaseOrderReturnCount(Long orderId) {