修复商品优惠金额
parent
c22f2afafd
commit
e58bc41af7
|
|
@ -817,9 +817,12 @@ class OrderService
|
||||||
foreach ($amounts as &$amount) {
|
foreach ($amounts as &$amount) {
|
||||||
$i--;
|
$i--;
|
||||||
|
|
||||||
|
$originalAmount = $amount;
|
||||||
|
|
||||||
if ($i > 0) {
|
if ($i > 0) {
|
||||||
$amount = (int) bcdiv(bcmul($couponAmount, $amount, 0), $totalAmount, 2);
|
$amount = (int) bcdiv(bcmul($couponAmount, $amount, 0), $totalAmount, 2);
|
||||||
$couponAmount -= $amount;
|
$couponAmount -= $amount;
|
||||||
|
$totalAmount -= $originalAmount;
|
||||||
} else {
|
} else {
|
||||||
$amount = $couponAmount;
|
$amount = $couponAmount;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue