调整优惠券计算
This commit is contained in:
parent
df2bdc1f1b
commit
d585ae22dc
@ -681,7 +681,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
} else {
|
||||
$couponPrice = min(max(0.01, bcmul($_coupon_price, bcdiv($cart['true_price'], $platformCouponRate['price'], 6), 2)), $cart['true_price']);
|
||||
}
|
||||
if ($platformCouponRate['type'] == StoreCouponRepository::TYPE_PLATFORM_CARD) {
|
||||
$cartCoupon[] = ['coupon_price' => $couponPrice, 'coupon_user_id' => $platformCouponRate['id'], 'cart_id' => $cart['cart_id']];
|
||||
}
|
||||
$platformCouponRate['coupon_price'] = bcsub($platformCouponRate['coupon_price'], $couponPrice, 2);
|
||||
$cart['true_price'] = bcsub($cart['true_price'], $couponPrice, 2);
|
||||
$cart['platform_coupon_price'] = $couponPrice;
|
||||
|
Loading…
x
Reference in New Issue
Block a user