caipin %!s(int64=5) %!d(string=hai) anos
pai
achega
801a5bf64e
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      protected/class/receipt.func.php

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

@@ -1796,13 +1796,14 @@ function excelRCData($summaryData,$aiAllList,$year){
 		$obj->getactivesheet()->setCellValue ( $value['0'].'2',$key);
 		$obj->getActiveSheet()->getStyle($value['0'].'2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
 		$obj->getActiveSheet()->mergeCells($value['0'].'2:'.$value['1'].'2');
+		$col=$value['0'];
 		foreach ($aiAllList[$key] as $k=>$v){
-			for ($col=$value['0'];$col<=$value['1'];$col++){
-				$obj->getactivesheet()->setCellValue ( $col.'3',$v['name']);
+			if($col>$value['1']){
 				break;
 			}
+			$obj->getactivesheet()->setCellValue ( $col.'3',$v['name']);
+			$col++;
 		}
-		
 	}
 	
 // 	echo (int)($cellCount/26).'</br>';