From ff46e189cc01669eddf5f114e6e282caed600768 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 13 Oct 2020 09:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E5=90=88=E7=BB=93=E7=AE=97=E5=8D=95?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=85=AC=E5=BC=8F=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AggregateFinanceStatementController.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 46acbb86a..2e1c626b5 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -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']);//甲方