From ba33a7b98dea1b01f622c681ac4b27bb401a958a Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Mon, 1 Jul 2024 12:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=94=AF=E4=BB=98=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 9ee898e05..bb31af72d 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -75,6 +75,7 @@ class OrderLogic extends BaseLogic self::$profit = 0; //利润 self::$activity_price = 0; //活动减少 self::$store_price = 0; //门店零售价 + self::$deduction_price =0; $deduction_price = 0; //抵扣金额 /** 计算价格 */ $off_activity = Config::where('name', 'off_activity')->value('value'); @@ -101,7 +102,6 @@ class OrderLogic extends BaseLogic $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]['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); $cart_select[$k]['deduction_price'] =$deduction_price;//抵扣金额