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++;