From 110086e74bda8d3119b3e2f49f6ec25c680e41ce Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 7 Nov 2024 16:02:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(xlsx):=20=E4=BF=AE=E5=A4=8D=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=97=E8=A1=A8=E5=90=88=E8=AE=A1=E9=A2=84=E6=94=B6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 OrderList 类中,修改了合计预收的计算逻辑 - 使用 bcadd 函数时,为 $order['deposit'] 添加了空值 --- app/common/service/xlsx/OrderList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/service/xlsx/OrderList.php b/app/common/service/xlsx/OrderList.php index caef8a8e..61fa1abb 100644 --- a/app/common/service/xlsx/OrderList.php +++ b/app/common/service/xlsx/OrderList.php @@ -126,7 +126,7 @@ class OrderList $sheet->setCellValue('G' . ($count + 7),'押金'); $sheet->setCellValue('H' . ($count + 7),$order['deposit'].'元'); $sheet->setCellValue('I' . ($count + 7),'合计预收'); - $sheet->setCellValue('J' . ($count + 7),bcadd($order['deposit'],$order['total_price']).'元'); + $sheet->setCellValue('J' . ($count + 7),bcadd($order['deposit']??0,$order['total_price']).'元'); $sheet->setCellValue('L' . ($count + 7),'接单员'); $sheet->setCellValue('M' . ($count + 7),$order['admin_name']); $sheet->setCellValue('O' . ($count + 7),'分单员');