|
|
@ -350,9 +350,12 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
$couponMoney = bcadd($couponMoney, $coupon->coupon->discounts, 2); |
|
|
$couponMoney = bcadd($couponMoney, $coupon->coupon->discounts, 2); |
|
|
} elseif ($coupon->coupon->discount_type == Coupon::DISCOUNT_TYPE_RATE) { |
|
|
} elseif ($coupon->coupon->discount_type == Coupon::DISCOUNT_TYPE_RATE) { |
|
|
$discountRate = bcdiv($coupon->coupon->discounts,10); |
|
|
$discountRate = bcdiv($coupon->coupon->discounts,10); |
|
|
$discountRate = bcsub(1,$discountRate); |
|
|
|
|
|
$discountMoney = bcmul($orderAmount, $discountRate); |
|
|
|
|
|
$couponMoney = bcadd($couponMoney, $discountMoney, 2); |
|
|
|
|
|
|
|
|
$discountMoney = bcmul($orderAmount, $discountRate, 2); |
|
|
|
|
|
$couponMoney = bcsub($orderAmount, $discountMoney, 2); |
|
|
|
|
|
// $discountRate = bcdiv($coupon->coupon->discounts,10);
|
|
|
|
|
|
// $discountRate = bcsub(1,$discountRate);
|
|
|
|
|
|
// $discountMoney = bcmul($orderAmount, $discountRate);
|
|
|
|
|
|
// $couponMoney = bcadd($couponMoney, $discountMoney, 2);
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|