|
@@ -30,6 +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']) && isset($params['change_type'])) {
|
|
if (isset($params['member_id']) && isset($params['change_type'])) {
|
|
|
$totalAmount = $query->sum('amount');
|
|
$totalAmount = $query->sum('amount');
|
|
|
$totalAmount = bcadd($totalAmount, 0, 2);
|
|
$totalAmount = bcadd($totalAmount, 0, 2);
|