导出公式添加

master
zhengyongxing 4 years ago
parent 0d13b05dc0
commit f72bb66356

@ -670,6 +670,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();
@ -690,8 +692,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']);//甲方

@ -261,8 +261,8 @@ class AggregateStatementPoolController extends ThinkController
$v['statement_count'] = count($v['statement_info']); $v['statement_count'] = count($v['statement_info']);
} }
if($is_export){ if($is_export){
$count["platform_amount"] = "=SUM(G2:G".$line.")"; $count["platform_amount"] = "=ROUND(SUM(G2:G".$line."),2)";
$count["sum_money"] = "=SUM(L2:L".$line.")"; $count["sum_money"] = "=ROUND(SUM(L2:L".$line."),2)";
} }
$this->assign("data",$infolist); $this->assign("data",$infolist);

Loading…
Cancel
Save