wugg 2 years ago
parent
commit
709876f41c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/admin/controller/Customer.php

+ 3 - 3
app/admin/controller/Customer.php

@@ -33,11 +33,11 @@ class Customer extends BaseController
 
         $data =[];
         foreach ($list as $key=>$value){
-            $total_fee= Db::name("invoice_pool")->where([["inv_in","=",$value['companyNo'],["status","<=",3],
-            ["is_del","=",0]]])->field("sum(ainv_fee) as ainv_fee,sum(winv_fee) as winv_fee,sum(inv_value) as total_fee")->find();
+			$total_fee = Db::name("qrd_info")->where([["customerNo","=",$value['companyNo']]])->field("sum(apay_fee) as apay_fee,sum(wpay_fee+pay_fee) as wpay_fee,sum(ainv_fee) as ainv_fee,sum(winv_fee+inv_fee) as winv_fee")
+            ->find();
             $value['ainv_fee'] = $total_fee['ainv_fee']??0;
             $value['winv_fee'] = $total_fee['winv_fee']??0;
-            $value['total_fee'] = $total_fee['total_fee']??0;
+            $value['total_fee'] = $value['winv_fee']+ $value['ainv_fee'];
             $data[]=$value;
         }
         return app_show(0,"获取成功",['list'=>$data,"count"=>$count]);