|
|
@@ -30,8 +30,7 @@ class Balance extends Controller
|
|
|
$query = BalanceLog::where(BalanceLogService::getWhere($params));
|
|
|
$data['total'] = $query->count();
|
|
|
$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['data'] = $query->orderByDesc('id')
|
|
|
->forPage($page, $limit)->with(['member'])
|