Merge branch 'release' of 47.111.118.107:wmtx/platform into hotfix/close_334promote_recharge

master
ELF 4 years ago
commit b7104222a5

@ -649,19 +649,19 @@ class AggregateFinanceStatementController extends ThinkController
$company_type = 0; $company_type = 0;
$company_info = []; $company_info = [];
if ($relation['first_company_type'] == 3) { if ($relation['collection'] == 1) {
$company_info = json_decode($relation['first_company_info'],true); $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); $company_info = json_decode($relation['second_company_info'],true);
} }
if ($company_info['company_type']=='个人') { if ($company_info['invoice_type']) {
$company_type = 1; $company_type = 1;
} elseif($company_info['company_type']=='公司') { } else {
$company_type = 2; $company_type = 2;
} }
if ($company_type == 1) { if ($company_type == 2) {
$this->excelDownStreamPersonTemplate($data,$big_pay_money); $this->excelDownStreamPersonTemplate($data,$big_pay_money);
} else { } else {
$this->excelDownStreamTemplate($data,$big_pay_money); $this->excelDownStreamTemplate($data,$big_pay_money);
@ -790,6 +790,8 @@ class AggregateFinanceStatementController extends ThinkController
$objPHPExcel->getActiveSheet()->setCellValue('D2','补点比例'); $objPHPExcel->getActiveSheet()->setCellValue('D2','补点比例');
} }
$line = 3; $line = 3;
$pay_amount_str = "=SUM(F3:";
$plat_amount_str = "=SUM(C3:";
foreach ($data['statement_info'] as $key => $value) { foreach ($data['statement_info'] as $key => $value) {
$objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1); $objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1);
$objPHPExcel->getActiveSheet()->removeConditionalStyles(); $objPHPExcel->getActiveSheet()->removeConditionalStyles();
@ -799,7 +801,8 @@ class AggregateFinanceStatementController extends ThinkController
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%'); $objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%');
$objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['money']); $objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['money']);
$objPHPExcel->getActiveSheet()->setCellValue('B'.$line, $product_name); $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('A'.$line)->getFont()->setBold(false);
$objPHPExcel->getActiveSheet()->getStyle('B'.$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); $objPHPExcel->getActiveSheet()->getStyle('F'.$line)->getFont()->setBold(false);
$line++; $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+1), $big_all_sum_money);//大写支付结算金额
//甲方信息 //甲方信息
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['first_party_info']['partner']);//甲方 $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['first_party_info']['partner']);//甲方

@ -496,7 +496,7 @@ class AggregateRelationController extends AdminController
//查询 //查询
$y = $this->DBModel->where("id='{$p['id']}'")->find(); $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; $p['status'] = 0;
$verify_log = [ $verify_log = [
@ -517,9 +517,13 @@ class AggregateRelationController extends AdminController
$p['second_company_id'] = $y['second_company_id']; $p['second_company_id'] = $y['second_company_id'];
$p['second_company_name'] = $y['second_company_name']; $p['second_company_name'] = $y['second_company_name'];
$p['second_company_type'] = $y['second_company_type']; $p['second_company_type'] = $y['second_company_type'];
} else { // } else {
$this->error('未做任何修改'); // $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){ if($p['first_company_type'] > 0){
$where = " $where = "
(first_company_type ='{$p['first_company_type']}' and first_company_id = '{$p['first_company_id']}') (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']; $company_info['invoice_item'] = $p['invoice_content'];
if ($p['invoice_type'] == 1) { if ($p['invoice_type'] == 1) {
$company_info['invoice_type'] = "专票"; $company_info['invoice_type'] = "增值税用发票";
} elseif($p['invoice_type'] == 2) { } 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); $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 = json_decode($p['second_company_info'],true);
$company_info['invoice_item'] = $p['invoice_content']; $company_info['invoice_item'] = $p['invoice_content'];
if ($p['invoice_type'] == 1) { if ($p['invoice_type'] == 1) {
$company_info['invoice_type'] = "专票"; $company_info['invoice_type'] = "增值税用发票";
} elseif($p['invoice_type'] == 2) { } 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); $p['second_company_info'] = json_encode($company_info);
@ -591,12 +599,12 @@ class AggregateRelationController extends AdminController
$dbres = $this->DBModel->where($map)->find(); $dbres = $this->DBModel->where($map)->find();
$first_company_info = $this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']); $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); $this->assign('first_company_info',$first_company_info);
$second_company_info = $this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']); $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); $this->assign('second_company_info',$second_company_info);
$dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']]; $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(); $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'],'专')) { if (strstr($companyInfo['invoice_type'],'专')) {
$companyInfo['invoice_type'] = "专票"; $companyInfo['invoice_type'] = "增值税用发票";
} else if (strstr($companyInfo['invoice_type'],'普')) { } else if (strstr($companyInfo['invoice_type'],'普')) {
$companyInfo['invoice_type'] = "普票"; $companyInfo['invoice_type'] = "增值税通发票";
} }
} }
if($type == 1){ if($type == 1){
@ -723,9 +731,9 @@ class AggregateRelationController extends AdminController
$companyInfo = $this->aggregateCompanyInfo; $companyInfo = $this->aggregateCompanyInfo;
if($companyInfo['invoice_type'] == 1) { if($companyInfo['invoice_type'] == 1) {
$companyInfo['invoice_type'] = '专票'; $companyInfo['invoice_type'] = '增值税用发票';
} else if($companyInfo['invoice_type'] == 2) { } else if($companyInfo['invoice_type'] == 2) {
$companyInfo['invoice_type'] = '普票'; $companyInfo['invoice_type'] = '增值税通发票';
} }
} }
if(isset($companyInfo['company_belong'])){ if(isset($companyInfo['company_belong'])){

@ -305,6 +305,7 @@ $(function(){
} else if (get_collection == 2) { } else if (get_collection == 2) {
companyinfo = second_company; companyinfo = second_company;
} }
console.log(companyinfo)
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,get_collection); setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,get_collection);
}); });
function setAggregateInfo(invoice_content,settlement_type,invoice_type,collection) { function setAggregateInfo(invoice_content,settlement_type,invoice_type,collection) {
@ -333,7 +334,7 @@ $(function(){
// $('#invoice_type').prop("disabled",true); // $('#invoice_type').prop("disabled",true);
// } // }
$("#settlement_type").find("option[value="+settlement_type+"]").prop("selected",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); $("#invoice_type").find("option[value="+invoice_type+"]").prop("selected",true);
$("#settlement_type").change(); $("#settlement_type").change();
$("#invoice_type").change(); $("#invoice_type").change();

@ -103,7 +103,7 @@
<th >聚合包名</th> <th >聚合包名</th>
<th >产品类型</th> <th >产品类型</th>
<th >结算周期</th> <th >结算周期</th>
<th colspan="2">游戏分成比例</th> <th colspan="2">我方分成比例</th>
<th >户名</th> <th >户名</th>
<th >账号</th> <th >账号</th>
<th >开户行</th> <th >开户行</th>

@ -157,7 +157,7 @@
<th >聚合包名</th> <th >聚合包名</th>
<th >产品类型</th> <th >产品类型</th>
<th >结算周期</th> <th >结算周期</th>
<th colspan="2">游戏分成比例</th> <th colspan="2">我方分成比例</th>
<th >户名</th> <th >户名</th>
<th >账号</th> <th >账号</th>

Loading…
Cancel
Save