待返回金额

This commit is contained in:
liu 2024-07-06 16:14:01 +08:00
parent a6460ecaf0
commit 562567cf07

View File

@ -54,6 +54,7 @@ class OrderLogic extends BaseLogic
public static $store_price; //门店零售价
public static $activity_price;
public static $deduction_price;
public static $frozen_money;//返还金额
/**
* @notes 获取购物车商品信息
@ -76,6 +77,7 @@ class OrderLogic extends BaseLogic
self::$activity_price = 0; //活动减少
self::$store_price = 0; //商户价
self::$deduction_price =0;
self::$frozen_money =0;//返还金额
$deduction_price = 0; //抵扣金额
/** 计算价格 */
$off_activity = Config::where('name', 'off_activity')->value('value');
@ -142,6 +144,7 @@ class OrderLogic extends BaseLogic
self::$cost = bcadd(self::$cost, $cart_select[$k]['purchase'], 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::$frozen_money = bcadd(self::$frozen_money, $cart_select[$k]['vip_frozen_price'], 2);//返还金额
// self::$profit = bcadd(self::$profit, $cart_select[$k]['profit'], 2);
}
//加支付方式限制
@ -169,6 +172,7 @@ class OrderLogic extends BaseLogic
'activity_price' => self::$activity_price,
'activities' => self::$activity_price > 0 ? 1 : 0,
'deduction_price' => self::$deduction_price,
'frozen_money' => self::$frozen_money,//返还金额(活动关闭得时候有)
'source' => 0,
'is_storage' => $params['is_storage'] ?? 0,
];