|
|
|
@ -94,9 +94,9 @@ class PaymentController extends BaseController
|
|
|
|
|
|
|
|
|
|
// dump($map);die();
|
|
|
|
|
$sum = M("pay_statement_info","tab_")
|
|
|
|
|
->alias('s')
|
|
|
|
|
->field("sum(if(s.pay_status=0,s.statement_money,0)) unpay_amount,sum(if(s.pay_status>0,s.statement_money,0)) pay_amount,sum(if(s.pay_status<0,s.statement_money,0)) faild_pay_amount")
|
|
|
|
|
->join("left join tab_company_statement_info c on s.statement_info_id = c.id")
|
|
|
|
|
->alias('c')
|
|
|
|
|
->field("sum(if(c.pay_status=0,c.statement_money,0)) unpay_amount,sum(if(c.pay_status>0,c.statement_money,0)) pay_amount,sum(if(c.pay_status<0,c.statement_money,0)) faild_pay_amount")
|
|
|
|
|
->join("left join tab_company_statement_info s on c.statement_info_id = s.id")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|