Browse Source

余额账户统计

gorden 6 days ago
parent
commit
29a2be99bf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/controller/finance/MemberAccountController.php

+ 2 - 2
app/admin/controller/finance/MemberAccountController.php

@@ -74,10 +74,10 @@ class MemberAccountController
         $statistics['memberTotal'] = $memberTotalModel->distinct('ma.join_account_member_id')->count();
 
         $total = $rows->count('member_id');
-        $statistics['surplus'] = $rows->sum('ma.member_account_surplus');
+        $statistics['added'] = $rows->sum('member_account_added');
+        $statistics['surplus'] = $rows->sum('ma.member_account_surplus')+$statistics['added'];
         $statistics['income'] = $rows->sum('ma.member_account_income');
         $statistics['expend'] = $rows->sum('member_account_expend');
-        $statistics['added'] = $rows->sum('member_account_added');
 
 //        $statistics['memberTotal'] = Member::where('member_mobile', '<>', '0000')
 //            ->when(!empty($level), function ($query) use ($level, $levelIds) {