Skip to content

Commit

Permalink
Merge pull request #563 from zhenxi-he/master
Browse files Browse the repository at this point in the history
【fix】ERP:采购金额计算逻辑错误
  • Loading branch information
YunaiV authored Jun 22, 2024
2 parents da815e8 + cb1bf8c commit cd99a36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void calculateTotalPrice(ErpPurchaseInDO purchaseIn, List<ErpPurchaseInI
purchaseIn.setDiscountPercent(BigDecimal.ZERO);
}
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) {
Expand Down Expand Up @@ -305,4 +305,4 @@ public List<ErpPurchaseInItemDO> getPurchaseInItemListByInIds(Collection<Long> i
return purchaseInItemMapper.selectListByInIds(inIds);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private void calculateTotalPrice(ErpPurchaseReturnDO purchaseReturn, List<ErpPur
purchaseReturn.setDiscountPercent(BigDecimal.ZERO);
}
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) {
Expand Down Expand Up @@ -301,4 +301,4 @@ public List<ErpPurchaseReturnItemDO> getPurchaseReturnItemListByReturnIds(Collec
return purchaseReturnItemMapper.selectListByReturnIds(returnIds);
}

}
}

0 comments on commit cd99a36

Please sign in to comment.