折扣价格处理
This commit is contained in:
parent
9255bda969
commit
92cc14faba
@ -64,7 +64,7 @@ class OrderLogic extends BaseLogic
|
||||
continue;
|
||||
}
|
||||
if(isset($check) && $check['status'] == 1){
|
||||
$find['price'] = StoreProduct::where('product_id',$find['product_id'])->value('ot_price');
|
||||
$find['price'] = StoreProduct::where('id',$find['product_id'])->withTrashed()->value('ot_price');
|
||||
}
|
||||
$cart_select[$k]['total'] = bcmul($v['cart_num'], $find['price'], 2);//钱
|
||||
$cart_select[$k]['price'] = $find['price'];
|
||||
@ -94,8 +94,9 @@ class OrderLogic extends BaseLogic
|
||||
$vipPrice = 0;
|
||||
if(isset($check) && $check['status'] == 1){
|
||||
// $discountRate = '0.99';//首单逻辑
|
||||
$discountRate = $check['remark'];
|
||||
$discountRate = bcdiv($discountRate, '100', 2);
|
||||
// $pay_price 是价格
|
||||
$discountRate = $check['remark'];//折扣
|
||||
$discountRate = bcdiv($discountRate, '10', 2);
|
||||
$pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2);
|
||||
}else{
|
||||
$userVip = User::where('id',\request()->userId)->value('user_ship');
|
||||
|
Loading…
x
Reference in New Issue
Block a user