From defa12d98f0e0bbb661a9736ec49c849247c1a95 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 18 Feb 2025 13:15:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E8=8D=AF=E5=93=81?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E9=87=91=E9=A2=9D=E9=94=99=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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 04702b0..6d1fef8 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -647,7 +647,19 @@ class PatientOrderService extends BaseService } // 处理优惠金额 - $order_product['discount_amount'] = $order_product['amount_total'] + $order_product['logistics_fee'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total']; // 优惠金额 + $order_product['discount_amount'] = bcsub( + bcsub( + bcadd( + $order_product['amount_total'], + $order_product['logistics_fee'] + ,2 + ), + $order_product['coupon_amount_total'], + 2 + ), + $order_product['payment_amount_total'], + 2 + ); // 优惠金额 $result = array();