This commit is contained in:
mkm 2024-06-17 18:00:44 +08:00
commit fabdddec05

View File

@ -85,11 +85,11 @@ class OrderLogic extends BaseLogic
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价
$cart_select[$k]['deduction_price'] =self::$activity_price;//抵扣金额
if ($user && $user['user_ship'] == 4) {
$deduction_price_count=bcmul(bcsub($find['price'], $find['purchase'], 2),$v['cart_num'],2);
$cart_select[$k]['deduction_price'] =$deduction_price_count;
self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
}
// if ($user && $user['user_ship'] == 4) {
// $deduction_price_count=bcmul(bcsub($find['price'], $find['purchase'], 2),$v['cart_num'],2);
// $cart_select[$k]['deduction_price'] =$deduction_price_count;
// self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
// }
//利润
// $cart_select[$k]['profit'] = bcmul($v['cart_num'], $onePrice, 2); //利润
$cart_select[$k]['purchase'] = bcmul($v['cart_num'], $find['purchase'], 2) ?? 0; //成本