caipin 5 年之前
父節點
當前提交
1e659369f7
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      protected/class/receipt.func.php

+ 4 - 2
protected/class/receipt.func.php

@@ -1871,12 +1871,14 @@ function excelRCData($summaryData,$aiAllList,$cglist,$year){
 		foreach ($aiAllList as $aiak=>$aiav){
 			$sectionStart=$sectionCount[$aiak]['0'];
 			$sectionStart++;
+			$sumRowStart=$onRow-1;
 			$obj->getActiveSheet()->getStyle($col.$onRow)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00);//设置百分比
 			$obj-> getActiveSheet() -> getStyle($col.$onRow) -> getFont()->getColor()->setRGB('f70000');
-			$obj->getactivesheet()->setCellValue( $col.$onRow, '=SUM('.$sectionStart.$onRow.':'.$sectionCount[$aiak]['1'].$onRow.')' );
+			//$obj->getactivesheet()->setCellValue( $col.$onRow, '=SUM('.$sectionStart.$onRow.':'.$sectionCount[$aiak]['1'].$onRow.')' );
+			$obj->getactivesheet()->setCellValue( $col.$onRow, '='.$col.$sumRowStart.'/'.$col.'4' );
 			$col++;
 			foreach ($aiav as $k=>$v){//项目细则
-				$sumRowStart=$onRow-1;
+				
 				$obj->getActiveSheet()->getStyle($col.$onRow)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00);
 				$obj->getactivesheet()->setCellValue( $col.$onRow, '='.$col.$sumRowStart.'/'.$col.'4' );
 				$col++;