fix: 比例计算根据可退金额计算
This commit is contained in:
parent
b1c0e73049
commit
d50d511c71
|
|
@ -214,9 +214,10 @@ public class TbCashierCart implements Serializable {
|
|||
totalAmount = packFee;
|
||||
} else {
|
||||
if (isMember != null && isMember == 1 && memberPrice != null && memberPrice.compareTo(BigDecimal.ZERO) > 0) {
|
||||
totalAmount = totalNumber.multiply(memberPrice).add(packFee).multiply(discountRadio);
|
||||
totalAmount = totalNumber.multiply(memberPrice).add(packFee).multiply(discountRadio).setScale(2, RoundingMode.HALF_UP);
|
||||
} else {
|
||||
totalAmount = totalNumber.multiply(discountSaleAmount != null ? discountSaleAmount : salePrice).add(packFee).multiply(discountRadio);
|
||||
totalAmount = totalNumber.multiply(discountSaleAmount != null ? discountSaleAmount : salePrice)
|
||||
.add(packFee).multiply(discountRadio).setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue