Changeset 755 for pro-violet-viettel/sourcecode/application/modules/admin
- Timestamp:
- Feb 10, 2015 10:47:29 AM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportpackage.php
r751 r755 90 90 $chars = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"); 91 91 $dem = 1; 92 $stt=1; 92 93 foreach ($data['packages'] as $package) { 93 94 $dem++; 94 $sheet->setCellValue($chars[$dem] . ($ index+ 4), $package['p_name']);95 $sheet->setCellValue($chars[$dem] . ($stt + 4), $package['p_name']); 95 96 $dem++; 96 $sheet->setCellValue($chars[$dem] . ($index + 4), "Tá» lá» %"); 97 $sheet->setCellValue($chars[$dem] . ($stt + 4), "Tá» lá» %"); 98 99 $stt++; 97 100 } 98 101 $dem++; 99 102 $sheet->setCellValue($chars[$dem] . ($index + 4), "Tá»ng TB"); 100 103 101 104 $stt=1; 102 105 foreach ($data['provinces'] as $index => $provinces) { 103 106 104 $sheet->setCellValue('A' . ($ index+ 5), $provinces['stt']);105 $sheet->setCellValue('B' . ($ index+ 5), $provinces['province']);107 $sheet->setCellValue('A' . ($stt + 5), $provinces['stt']); 108 $sheet->setCellValue('B' . ($stt + 5), $provinces['province']); 106 109 $dem = 1; 107 110 foreach ($provinces['packages'] as $package) { 108 111 $dem++; 109 $sheet->setCellValue($chars[$dem] . ($ index+ 5), $package['total']);112 $sheet->setCellValue($chars[$dem] . ($stt + 5), $package['total']); 110 113 $dem++; 111 $sheet->setCellValue($chars[$dem] . ($ index+ 5), $package['percent']);114 $sheet->setCellValue($chars[$dem] . ($stt + 5), $package['percent']); 112 115 } 113 116 $dem++; 114 $sheet->setCellValue($chars[$dem] . ($index + 5), $provinces['total']); 117 118 $sheet->setCellValue($chars[$dem] . ($stt + 5), $provinces['total']); 119 $stt++; 115 120 } 116 121 $writer = new PHPExcel_Writer_Excel5($this->phpexcel); -
pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
r749 r755 48 48 49 49 50 50 $dem=1; 51 51 foreach ($provinces as $index2 => $province) { 52 $provinces[$index2] = array("stt" => ($ index2 + 1), "province" => $province, "dtn" => 0, "dtt" => 0, "dtng" => 0, "tbn" => 0, "tbt" => 0, "tbng" => 0);52 $provinces[$index2] = array("stt" => ($dem), "province" => $province, "dtn" => 0, "dtt" => 0, "dtng" => 0, "tbn" => 0, "tbt" => 0, "tbng" => 0); 53 53 foreach ($dtns as $data) { 54 if ($ province== $data['province']) {54 if ($index2 == $data['province']) { 55 55 $provinces[$index2]['dtn'] = $data['total']; 56 56 } 57 57 } 58 58 foreach ($dtng as $data) { 59 if ($ province== $data['province']) {59 if ($index2 == $data['province']) { 60 60 $provinces[$index2]['dtng'] = $data['total']; 61 61 } 62 62 } 63 63 foreach ($dtts as $data) { 64 if ($ province== $data['province']) {64 if ($index2 == $data['province']) { 65 65 $provinces[$index2]['dtt'] = $data['total']; 66 66 … … 71 71 72 72 foreach ($tbns as $data) { 73 if ($ province== $data['province']) {73 if ($index2 == $data['province']) { 74 74 $provinces[$index2]['tbn'] = $data['total']; 75 75 } 76 76 } 77 77 foreach ($tbng as $data) { 78 if ($ province== $data['province']) {78 if ($index2 == $data['province']) { 79 79 $provinces[$index2]['tbng'] = $data['total']; 80 80 } 81 81 } 82 82 foreach ($tbts as $data) { 83 if ($ province== $data['province']) {83 if ($index2 == $data['province']) { 84 84 $provinces[$index2]['tbt'] = $data['total']; 85 85 } 86 86 } 87 $dem++; 87 88 } 88 89 … … 114 115 $provinces[$index] = array("province" => $province); 115 116 } 116 117 $dem=1; 117 118 foreach ($provinces as $index => $province) { 118 $provinces[$index]['stt'] = $ index + 1;119 $provinces[$index]['stt'] = $dem; 119 120 $provinces[$index]['total'] = 0; 120 121 $totaluser = 0; … … 124 125 $total = 0; 125 126 foreach ($package['users'] as $user) { 126 if ($ province['province']== $user['province']) {127 if ($index == $user['province']) { 127 128 $total = $total + 1; 128 129 $totaluser = $totaluser + 1; … … 134 135 } 135 136 } 137 $dem++; 136 138 } 137 139 foreach ($provinces as $index => $province) { … … 158 160 { 159 161 // $input['month']=1; 160 // $input['year']=2014;162 //svn $input['year']=2014; 161 163 $data=$this->getPackages($input); 162 164 return $data;
Note: See TracChangeset
for help on using the changeset viewer.