6
0
Fork 0

修复商品优惠金额

release
李静 2022-04-14 11:54:51 +08:00
parent c22f2afafd
commit e58bc41af7
1 changed files with 3 additions and 0 deletions

View File

@ -817,9 +817,12 @@ class OrderService
foreach ($amounts as &$amount) {
$i--;
$originalAmount = $amount;
if ($i > 0) {
$amount = (int) bcdiv(bcmul($couponAmount, $amount, 0), $totalAmount, 2);
$couponAmount -= $amount;
$totalAmount -= $originalAmount;
} else {
$amount = $couponAmount;
}