|
|
|
@ -1896,6 +1896,8 @@ function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_
|
|
|
|
|
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('C7', "支付给:".$data['receive_company']['partner']); //增加支付给对应公司
|
|
|
|
|
$line = 10;
|
|
|
|
|
//记录统计项目
|
|
|
|
|
$pay_amount_str = "=";
|
|
|
|
|
//增加结算记录
|
|
|
|
|
foreach ($data['statement_info'] as $key => $value) {
|
|
|
|
|
$objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1)->mergeCells("J$line:K$line");
|
|
|
|
@ -1920,8 +1922,14 @@ function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('H'.$line, $value['promote_ratio'] . '%');
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('I'.$line, $value['fax_ratio']. '%');
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['pay_amount']);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('J'.$line, $value['sum_money']);
|
|
|
|
|
// $objPHPExcel->getActiveSheet()->setCellValue('J'.$line, $value['sum_money']);
|
|
|
|
|
if ($data['pay_type'] == 2) {
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('J'.$line, "=E{$line}*(1-H{$line})*G{$line}*(1-I{$line})");
|
|
|
|
|
}else{
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('J'.$line, "=E{$line}*(1-H{$line})*F{$line}*(1-I{$line})");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$pay_amount_str .= "J{$line}+";
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('D'.$line, $product_name);
|
|
|
|
|
|
|
|
|
|
$line++;
|
|
|
|
@ -1929,9 +1937,11 @@ function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_
|
|
|
|
|
|
|
|
|
|
//合计
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("E" . ($line), $data['pay_amount']);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line), $data['statement_money']);
|
|
|
|
|
// $objPHPExcel->getActiveSheet()->setCellValue("J" . ($line), $data['statement_money']);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line), trim($pay_amount_str,"+"));
|
|
|
|
|
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+1), $big_all_sum_money); //本月分成总金额(人民币大写)
|
|
|
|
|
// $objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+1), $big_all_sum_money); //本月分成总金额(人民币大写)
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+1), "=J{$line}"); //本月分成总金额(人民币大写)
|
|
|
|
|
|
|
|
|
|
//收款方
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue("D" . ($line+2), $data['receive_company']['payee_name']);
|
|
|
|
@ -1985,7 +1995,7 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$line = 3;
|
|
|
|
|
|
|
|
|
|
$pay_amount_str = "=";
|
|
|
|
|
foreach ($data['statement_info'] as $key => $value) {
|
|
|
|
|
$objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->removeConditionalStyles();
|
|
|
|
@ -2011,18 +2021,20 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al
|
|
|
|
|
}
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%');
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['pay_amount']);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['sum_money']);
|
|
|
|
|
// $objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['sum_money']);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('F'.$line,"=C{$line}*D{$line}*(1-E{$line})");
|
|
|
|
|
}
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('B'.$line, $product_name);
|
|
|
|
|
|
|
|
|
|
$pay_amount_str .= "F{$line}+";
|
|
|
|
|
$line++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $data['pay_amount']);//合计-平台总额
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $data['statement_money']);//合计-结算金额
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('F'.($line), trim($pay_amount_str,"+"));//合计-结算金额
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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+1), "=F{$line}");//大写支付结算金额
|
|
|
|
|
//甲方信息
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['pay_company']['partner']);//甲方
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+4), $data['pay_company']['link_man']);//联系人
|
|
|
|
|