From 38e25e90392a9be608c90b15578e195e8e494663 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Sat, 15 Oct 2022 17:43:12 +0800 Subject: [PATCH] update: fix stat --- app/Http/Controllers/Admin/StatController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Admin/StatController.php b/app/Http/Controllers/Admin/StatController.php index 768dfd05..3f37ab6d 100644 --- a/app/Http/Controllers/Admin/StatController.php +++ b/app/Http/Controllers/Admin/StatController.php @@ -47,12 +47,12 @@ class StatController extends Controller ->where('created_at', '<', strtotime(date('Y-m-1'))) ->whereNotIn('status', [0, 2]) ->sum('total_amount'), - 'commission_month_payout' => Order::where('commission_balance' ,'!=', NULL) + 'commission_month_payout' => Order::where('actual_commission_balance' ,'!=', NULL) ->where('created_at', '<', time()) - ->sum('commission_balance'), - 'commission_last_month_payout' => Order::where('commission_balance' ,'!=', NULL) + ->sum('actual_commission_balance'), + 'commission_last_month_payout' => Order::where('actual_commission_balance' ,'!=', NULL) ->where('created_at', '<', strtotime(date('Y-m-1'))) - ->sum('commission_balance'), + ->sum('actual_commission_balance'), ] ]); }