Browse Source

fix dashboard month income

Tokumeikoi 4 years ago
parent
commit
c3e924036a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/Admin/StatController.php

+ 1 - 1
app/Http/Controllers/Admin/StatController.php

@@ -20,7 +20,7 @@ class StatController extends Controller
             'data' => [
                 'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1')))
                     ->where('created_at', '<', time())
-                    ->where('status', 3)
+                    ->whereIn('status', [3, 4])
                     ->sum('total_amount'),
                 'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1')))
                     ->where('created_at', '<', time())