修改更新减去的门店价格
This commit is contained in:
parent
f9114271ec
commit
1409782ff7
@ -74,7 +74,7 @@ class OrderLogic extends BaseLogic
|
||||
self::$cost = 0; //成本由采购价替代原成本为门店零售价
|
||||
self::$profit = 0; //利润
|
||||
self::$activity_price = 0; //活动减少
|
||||
self::$store_price = 0; //门店零售价
|
||||
self::$store_price = 0; //商户价
|
||||
self::$deduction_price =0;
|
||||
$deduction_price = 0; //抵扣金额
|
||||
/** 计算价格 */
|
||||
@ -105,7 +105,7 @@ class OrderLogic extends BaseLogic
|
||||
// $cart_select[$k]['profit'] = bcmul($v['cart_num'], $onePrice, 2); //利润
|
||||
$cart_select[$k]['purchase'] = bcmul($v['cart_num'], $find['purchase'], 2) ?? 0; //成本
|
||||
$cart_select[$k]['pay_price'] = bcmul($v['cart_num'], $price, 2); //订单支付金额
|
||||
$cart_select[$k]['store_price'] = bcmul($v['cart_num'], $find['cost'], 2) ?? 0; //门店零售价
|
||||
$cart_select[$k]['store_price'] = bcmul($v['cart_num'], $find['cost'], 2) ?? 0; //商户价
|
||||
$cart_select[$k]['vip_price'] = bcmul($v['cart_num'], $find['vip_price'], 2) ?? 0; //vip售价
|
||||
if($cart_select[$k]['total_price']>$cart_select[$k]['pay_price']){
|
||||
$deduction_price=bcsub($cart_select[$k]['total_price'],$cart_select[$k]['pay_price'],2);
|
||||
@ -120,7 +120,7 @@ class OrderLogic extends BaseLogic
|
||||
if ($user && $off_activity==0){
|
||||
if($user['user_ship']==4){
|
||||
//商户
|
||||
$cart_select[$k]['vip_frozen_price'] = bcsub($cart_select[$k]['pay_price'], $cart_select[$k]['purchase'], 2);
|
||||
$cart_select[$k]['vip_frozen_price'] = bcsub($cart_select[$k]['pay_price'], $cart_select[$k]['store_price'], 2);
|
||||
}else{
|
||||
//其他会员
|
||||
$cart_select[$k]['vip_frozen_price'] = bcsub($cart_select[$k]['pay_price'],$cart_select[$k]['vip_price'], 2);
|
||||
@ -140,7 +140,7 @@ class OrderLogic extends BaseLogic
|
||||
self::$total_price = bcadd(self::$total_price, $cart_select[$k]['total_price'], 2);
|
||||
self::$pay_price = bcadd(self::$pay_price, $cart_select[$k]['pay_price'], 2);
|
||||
self::$cost = bcadd(self::$cost, $cart_select[$k]['purchase'], 2);
|
||||
self::$store_price = bcadd(self::$store_price, $cart_select[$k]['store_price'], 2); //门店零售价格
|
||||
self::$store_price = bcadd(self::$store_price, $cart_select[$k]['store_price'], 2); //商户价
|
||||
self::$deduction_price=bcadd(self::$deduction_price,$deduction_price,2);//抵扣金额
|
||||
// self::$profit = bcadd(self::$profit, $cart_select[$k]['profit'], 2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user