调整砍价下单计算优惠
parent
7379446690
commit
bbabc71f82
|
|
@ -863,9 +863,12 @@ class OrderService
|
|||
foreach ($amounts as &$amount) {
|
||||
$i--;
|
||||
|
||||
$originalAmount = $amount;
|
||||
|
||||
if ($i > 0) {
|
||||
$amount = (int) bcdiv(bcmul($bargainAmount, $amount, 0), $totalAmount, 2);
|
||||
$bargainAmount -= $amount;
|
||||
$totalAmount -= $originalAmount;
|
||||
} else {
|
||||
$amount = $bargainAmount;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue