diff --git a/Application/Admin/Controller/CompanyStatementLackController.class.php b/Application/Admin/Controller/CompanyStatementLackController.class.php index 658649fb7..2403610c6 100644 --- a/Application/Admin/Controller/CompanyStatementLackController.class.php +++ b/Application/Admin/Controller/CompanyStatementLackController.class.php @@ -55,7 +55,7 @@ class CompanyStatementLackController extends ThinkController $map['company_type'] = $_REQUEST['company_type']; } if(isset($_REQUEST['company_name'])){ - $map['company_name'] =["LIKE","%{$_REQUEST['company_id']}%"]; + $map['company_name'] =["LIKE","%{$_REQUEST['company_name']}%"]; } if(isset($_REQUEST['statement_pool_num'])){ $map['statement_pool_num'] =["LIKE","%{$_REQUEST['statement_pool_num']}%"]; diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 091555059..f83a57c60 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -207,7 +207,7 @@ class CompanyStatementPoolController extends ThinkController //获取基本信息 $infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select(); //获取母单 - $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status')->where("id={$id}")->find(); + $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment')->where("id={$id}")->find(); $statement_num = $pool_info['statement_num']; $this->assign("title",$statement_num); $this->assign("pool_status",$pool_info['verify_status']); @@ -226,12 +226,12 @@ class CompanyStatementPoolController extends ThinkController $infolist =array_merge($infolist,$lack_info); } - $this->viewPuPool($infolist,$is_export); + $this->viewPuPool($infolist,$is_export,$pool_info); } } //个人汇总结算查看 - public function viewPuPool(&$infolist,$is_export){ + public function viewPuPool(&$infolist,$is_export,$pool_info){ // dd($infolist); $line = 1; $count = []; @@ -260,26 +260,19 @@ class CompanyStatementPoolController extends ThinkController }else{ $va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; } - $count['sum_money_exp'] .= "O{$line}+"; - $count['platform_amount_exp'] .= "J{$line}+"; }else{ $count['platform_amount'] += $va['pay_amount']; $count['sum_money'] += $va['sum_money']; } } $v['statement_count'] = count($v['statement_info']); - } if($is_export){ - $platform_amount_exp = trim($count["platform_amount_exp"],"+"); - $sum_money_exp = trim($count["sum_money_exp"],"+"); - if(empty($platform_amount_exp)){ $platform_amount_exp = 0;} - if(empty($sum_money_exp)){ $sum_money_exp = 0;} - - $count["platform_amount"] = "=".$platform_amount_exp; - $count["sum_money"] = "=".$sum_money_exp; + $count["platform_amount"] = "=SUM(J2:J".$line.")"; + $count["sum_money"] = "=SUM(O2:O".$line.")"; } $this->assign("data",$infolist); + $this->assign("is_payment",$pool_info['is_payment']); $this->assign("count",$count); $this->assign("is_export",$is_export); $this->display("CompanyStatementPool/viewPuPool"); diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index d3ea8805d..2081bbc63 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -408,8 +408,9 @@ class CompanyStatementSetController extends Controller { //金额为0不补点 continue; } - if($add_data['platform_amount'] <= 0){ - return; + if($add_data['platform_amount'] == 0){ + //全等于0表示没有流水,小于0依旧要结算 + return; } //添加 if($recount && $company_id !== false){ diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index 5b6b25910..f3f9dcf08 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -111,10 +111,17 @@