From 23d9c4dbfb7aee981e7465878f79f2bba733f5a7 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 18 Feb 2025 13:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=A1=B5=EF=BC=8C=E4=BC=98=E6=83=A0=E9=87=91=E9=A2=9D=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientOrderService.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 6d1fef8..737696a 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -934,7 +934,20 @@ class PatientOrderService extends BaseService $result['amount_total'] = $order_product['amount_total']; // 订单金额 $result['payment_amount_total'] = $order_product['payment_amount_total']; // 实际订单金额 $result['coupon_amount_total'] = $order_product['coupon_amount_total']; // 优惠金额 - $result['discount_amount'] = $order_product['amount_total'] - $order_product['coupon_amount_total'] + $order_product['logistics_fee'] - $order_product['payment_amount_total']; // 优惠金额 + $result['discount_amount'] = + bcsub( + bcadd( + bcsub( + $order_product['amount_total'], + $order_product['coupon_amount_total'], + 2 + ), + $order_product['logistics_fee'], + 2 + ), + $order_product['payment_amount_total'], + 2 + ); // 优惠金额 // 获取优惠卷不可用原因。存在优惠卷,但是未使用-暂时废弃 /*if ($order_product['coupon_amount_total'] == 0){