修复商品优惠金额
parent
c22f2afafd
commit
e58bc41af7
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue