caipin 6 년 전
부모
커밋
b961815b2b
1개의 변경된 파일26개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 2
      protected/class/receipt.func.php

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

@@ -1813,6 +1813,31 @@ function excelRCData($summaryData,$aiAllList,$cglist,$year){
 	}
 	
 	//数据填充
+	//全年全选中办事处 金额合计
+	$obj->getactivesheet()->setCellValue ( 'A'.$onRow,$year.'年合计' );
+	$col='H';
+	//合计行数计算
+	$cgRow=array();
+	foreach ($cglist as $cgk=>$value){
+		$row=5;
+	}
+	
+	
+	foreach ($aiAllList as $aiak=>$aiav){
+		$sectionCount[$aiak]['0']++;
+		$obj-> getActiveSheet() -> getStyle($col.$onRow) -> getFont()->getColor()->setRGB('f70000');
+		$obj->getactivesheet()->setCellValue( $col.$onRow, '=SUM('.$sectionCount[$aiak]['0'].$onRow.':'.$sectionCount[$aiak]['1'].$onRow.')' );
+		$col++;
+		foreach ($aiav as $k=>$v){//项目细则
+			
+			
+			
+			//$obj->getactivesheet()->setCellValue( $col.$onRow, '=SUM('.$col.$sumRowStart.':'.$col.$sumRowEnd.')' );
+			$col++;
+		}
+	}
+	$onRow++;//行数增加
+	
 	foreach ($cglist as $cgk=>$value){
 		
 		//办事处年合计详情
@@ -1847,10 +1872,9 @@ function excelRCData($summaryData,$aiAllList,$cglist,$year){
 			if(isset($summaryData[$value['cid']])){
 				foreach ($aiAllList as $aiak=>$aiav){//总项目
 					
-					$obj->getactivesheet()->setCellValue ( 'A'.$onRow,$value['title'].$month.'月合计' );
-					
 					//$sectionCount[$aiak]['1'].$onRow
 					$sectionCount[$aiak]['0']++;
+					$obj-> getActiveSheet() -> getStyle($col.$onRow) -> getFont()->getColor()->setRGB('f70000');
 					$obj->getactivesheet()->setCellValue( $col.$onRow, '=SUM('.$sectionCount[$aiak]['0'].$onRow.':'.$sectionCount[$aiak]['1'].$onRow.')' );//公式
 					$col++;
 					foreach ($aiav as $k=>$v){//项目细则