From 3729250fde745ef2847b98ffa98494b4f812e36d Mon Sep 17 00:00:00 2001 From: weizong song Date: Tue, 1 Aug 2023 11:09:22 +0800 Subject: [PATCH 1/2] up --- app/Http/Controllers/Admin/StatisticsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 38659b9..c20bc32 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -273,9 +273,9 @@ class StatisticsController extends CommonController $query->whereRaw("UNIX_TIMESTAMP(`created_at`) <= {$before_datetime}")->orderBy("id", "desc"); } ]) - ->whereHas("oneBalance", function ($query) use ($before_datetime) { - $query->whereRaw("UNIX_TIMESTAMP(`created_at`) <= {$before_datetime}")->where("balance", ">", 0)->orderBy("id", "desc"); - }) +// ->whereHas("oneBalance", function ($query) use ($before_datetime) { +// $query->whereRaw("UNIX_TIMESTAMP(`created_at`) <= {$before_datetime}")->where("balance", ">", 0)->orderBy("id", "desc"); +// }) ->whereHas("orders", function ($query) use ($before_datetime, $project_id) { $query ->whereRaw("UNIX_TIMESTAMP(`created_at`) <= {$before_datetime}") From f5d3654882db859a09ea396a432b74e712bed695 Mon Sep 17 00:00:00 2001 From: weizong song Date: Tue, 1 Aug 2023 11:10:01 +0800 Subject: [PATCH 2/2] up --- resources/views/admin/statistics/customer-balance.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/statistics/customer-balance.blade.php b/resources/views/admin/statistics/customer-balance.blade.php index 86a2ec1..ba7daaf 100755 --- a/resources/views/admin/statistics/customer-balance.blade.php +++ b/resources/views/admin/statistics/customer-balance.blade.php @@ -60,7 +60,7 @@ {{ $item->mobile }} {{ $item->patients->count() ? $item->patients->last()->name : "无" }} {{ date("Y-m-d H:i:s",$before_datetime) }} - {{ $item->oneBalance->balance }} + {{ $item->oneBalance ? $item->oneBalance->balance : "0" }} @endforeach