Ken il y a 1 semaine
Parent
commit
985127225f
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      app/Http/Controllers/admin/Balance.php

+ 1 - 2
app/Http/Controllers/admin/Balance.php

@@ -30,8 +30,7 @@ class Balance extends Controller
             $query = BalanceLog::where(BalanceLogService::getWhere($params));
             $query = BalanceLog::where(BalanceLogService::getWhere($params));
             $data['total'] = $query->count();
             $data['total'] = $query->count();
             $totalAmount = '--';
             $totalAmount = '--';
-            if (isset($params['member_id'])) $totalAmount = $query->sum('amount');
-
+            if (isset($params['member_id']) && isset($params['change_type'])) $totalAmount = $query->sum('amount');
             $data['total_amount'] = $totalAmount;
             $data['total_amount'] = $totalAmount;
             $data['data'] = $query->orderByDesc('id')
             $data['data'] = $query->orderByDesc('id')
                 ->forPage($page, $limit)->with(['member'])
                 ->forPage($page, $limit)->with(['member'])