Explorar o código

fix dashboard month income

Tokumeikoi %!s(int64=4) %!d(string=hai) anos
pai
achega
c3e924036a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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' => [
             'data' => [
                 'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1')))
                 'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1')))
                     ->where('created_at', '<', time())
                     ->where('created_at', '<', time())
-                    ->where('status', 3)
+                    ->whereIn('status', [3, 4])
                     ->sum('total_amount'),
                     ->sum('total_amount'),
                 'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1')))
                 'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1')))
                     ->where('created_at', '<', time())
                     ->where('created_at', '<', time())