diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 1d1d73bfd..2e1c626b5 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -649,19 +649,19 @@ class AggregateFinanceStatementController extends ThinkController $company_type = 0; $company_info = []; - if ($relation['first_company_type'] == 3) { + if ($relation['collection'] == 1) { $company_info = json_decode($relation['first_company_info'],true); - } elseif($relation['second_company_type'] == 3) { + } elseif($relation['collection'] == 2) { $company_info = json_decode($relation['second_company_info'],true); } - if ($company_info['company_type']=='个人') { + if ($company_info['invoice_type']) { $company_type = 1; - } elseif($company_info['company_type']=='公司') { + } else { $company_type = 2; } - if ($company_type == 1) { + if ($company_type == 2) { $this->excelDownStreamPersonTemplate($data,$big_pay_money); } else { $this->excelDownStreamTemplate($data,$big_pay_money); @@ -790,6 +790,8 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('D2','补点比例'); } $line = 3; + $pay_amount_str = "=SUM(F3:"; + $plat_amount_str = "=SUM(C3:"; foreach ($data['statement_info'] as $key => $value) { $objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1); $objPHPExcel->getActiveSheet()->removeConditionalStyles(); @@ -799,7 +801,8 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%'); $objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['money']); $objPHPExcel->getActiveSheet()->setCellValue('B'.$line, $product_name); - $objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['ratio_money']); +// $objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['ratio_money']); + $objPHPExcel->getActiveSheet()->setCellValue('F'.$line,"=ROUND(C{$line}*D{$line}*(1-E{$line}),2)"); $objPHPExcel->getActiveSheet()->getStyle('A'.$line)->getFont()->setBold(false); $objPHPExcel->getActiveSheet()->getStyle('B'.$line)->getFont()->setBold(false); @@ -809,8 +812,12 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->getStyle('F'.$line)->getFont()->setBold(false); $line++; } - $objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $data['pay_money']);//合计-平台总额 - $objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $data['ratio_money']);//合计-结算金额 + + $objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $plat_amount_str."C".($line-1).")");//合计-平台总额 + $objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $pay_amount_str."F".($line-1).")");//合计-结算金额 + +// $objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $data['pay_money']);//合计-平台总额 +// $objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $data['ratio_money']);//合计-结算金额 $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+1), $big_all_sum_money);//大写支付结算金额 //甲方信息 $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['first_party_info']['partner']);//甲方 diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 590c0641d..bedec1f2e 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -496,7 +496,7 @@ class AggregateRelationController extends AdminController //查询 $y = $this->DBModel->where("id='{$p['id']}'")->find(); - if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){ +// if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){ //修改了进行审核 $p['status'] = 0; $verify_log = [ @@ -517,9 +517,13 @@ class AggregateRelationController extends AdminController $p['second_company_id'] = $y['second_company_id']; $p['second_company_name'] = $y['second_company_name']; $p['second_company_type'] = $y['second_company_type']; - } else { - $this->error('未做任何修改'); - } +// } else { +// $verify_log = [ +// "create_user"=>$this->admininfo["username"], +// "create_time"=>date("Y-m-d H:i:s") +// ]; +// $p['verify_log'] = json_encode($verify_log); +// } if($p['first_company_type'] > 0){ $where = " (first_company_type ='{$p['first_company_type']}' and first_company_id = '{$p['first_company_id']}') @@ -549,9 +553,11 @@ class AggregateRelationController extends AdminController $company_info['invoice_item'] = $p['invoice_content']; if ($p['invoice_type'] == 1) { - $company_info['invoice_type'] = "专票"; + $company_info['invoice_type'] = "增值税专用发票"; } elseif($p['invoice_type'] == 2) { - $company_info['invoice_type'] = "普票"; + $company_info['invoice_type'] = "增值税普通发票"; + } else { + $company_info['invoice_type'] = ""; } $p['first_company_info'] = json_encode($company_info); @@ -561,9 +567,11 @@ class AggregateRelationController extends AdminController $company_info = json_decode($p['second_company_info'],true); $company_info['invoice_item'] = $p['invoice_content']; if ($p['invoice_type'] == 1) { - $company_info['invoice_type'] = "专票"; + $company_info['invoice_type'] = "增值税专用发票"; } elseif($p['invoice_type'] == 2) { - $company_info['invoice_type'] = "普票"; + $company_info['invoice_type'] = "增值税普通发票"; + } else { + $company_info['invoice_type'] = ""; } $p['second_company_info'] = json_encode($company_info); @@ -591,12 +599,12 @@ class AggregateRelationController extends AdminController $dbres = $this->DBModel->where($map)->find(); $first_company_info = $this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']); - $first_company_info['invoice_type'] = $first_company_info['invoice_type'] == "专票" ? 1 : ($first_company_info['invoice_type'] == "普票"?2:''); + $first_company_info['invoice_type'] = strstr($first_company_info['invoice_type'],'专') ? 1 : (strstr($first_company_info['invoice_type'],'普')?2:''); $this->assign('first_company_info',$first_company_info); $second_company_info = $this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']); - $second_company_info['invoice_type'] = $second_company_info['invoice_type'] == "专票" ? 1 : ($second_company_info['invoice_type'] == "普票"?2:''); + $second_company_info['invoice_type'] = strstr($second_company_info['invoice_type'],'专') ? 1 : (strstr($second_company_info['invoice_type'],'普')?2:''); $this->assign('second_company_info',$second_company_info); $dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']]; @@ -704,9 +712,9 @@ class AggregateRelationController extends AdminController //己方公司 $companyInfo = M("CompanyInfo","tab_")->field("id,partner company_name,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,invoice_item,invoice_type,register_phone,register_address")->where("status='1' AND id='{$id}'")->find(); if (strstr($companyInfo['invoice_type'],'专')) { - $companyInfo['invoice_type'] = "专票"; + $companyInfo['invoice_type'] = "增值税专用发票"; } else if (strstr($companyInfo['invoice_type'],'普')) { - $companyInfo['invoice_type'] = "普票"; + $companyInfo['invoice_type'] = "增值税普通发票"; } } if($type == 1){ @@ -723,9 +731,9 @@ class AggregateRelationController extends AdminController $companyInfo = $this->aggregateCompanyInfo; if($companyInfo['invoice_type'] == 1) { - $companyInfo['invoice_type'] = '专票'; + $companyInfo['invoice_type'] = '增值税专用发票'; } else if($companyInfo['invoice_type'] == 2) { - $companyInfo['invoice_type'] = '普票'; + $companyInfo['invoice_type'] = '增值税普通发票'; } } if(isset($companyInfo['company_belong'])){ diff --git a/Application/Admin/View/AggregateRelation/edit.html b/Application/Admin/View/AggregateRelation/edit.html index eddd8017f..b04a410da 100644 --- a/Application/Admin/View/AggregateRelation/edit.html +++ b/Application/Admin/View/AggregateRelation/edit.html @@ -305,6 +305,7 @@ $(function(){ } else if (get_collection == 2) { companyinfo = second_company; } + console.log(companyinfo) setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,get_collection); }); function setAggregateInfo(invoice_content,settlement_type,invoice_type,collection) { @@ -333,7 +334,7 @@ $(function(){ // $('#invoice_type').prop("disabled",true); // } $("#settlement_type").find("option[value="+settlement_type+"]").prop("selected",true); - + console.log(invoice_type); $("#invoice_type").find("option[value="+invoice_type+"]").prop("selected",true); $("#settlement_type").change(); $("#invoice_type").change(); diff --git a/Application/Admin/View/CpJuheCompany/export.html b/Application/Admin/View/CpJuheCompany/export.html index 79fcfce76..9623b174c 100644 --- a/Application/Admin/View/CpJuheCompany/export.html +++ b/Application/Admin/View/CpJuheCompany/export.html @@ -103,7 +103,7 @@ 聚合包名 产品类型 结算周期 - 游戏分成比例 + 我方分成比例 户名 账号 开户行 diff --git a/Application/Admin/View/CpJuheCompany/index.html b/Application/Admin/View/CpJuheCompany/index.html index 3243d7751..33e975183 100644 --- a/Application/Admin/View/CpJuheCompany/index.html +++ b/Application/Admin/View/CpJuheCompany/index.html @@ -157,7 +157,7 @@ 聚合包名 产品类型 结算周期 - 游戏分成比例 + 我方分成比例 户名 账号 diff --git a/Public/Admin/excel/aggregate_person_stream.xls b/Public/Admin/excel/aggregate_person_stream.xls index b56405e21..bd3dedc9a 100644 Binary files a/Public/Admin/excel/aggregate_person_stream.xls and b/Public/Admin/excel/aggregate_person_stream.xls differ diff --git a/Public/Admin/excel/aggregate_stream.xls b/Public/Admin/excel/aggregate_stream.xls index c55d4cdf8..35d911c19 100644 Binary files a/Public/Admin/excel/aggregate_stream.xls and b/Public/Admin/excel/aggregate_stream.xls differ