Index: /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportpackage.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportpackage.php	(revision 754)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportpackage.php	(revision 755)
@@ -90,27 +90,32 @@
         $chars = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L");
         $dem = 1;
+        $stt=1;
         foreach ($data['packages'] as $package) {
             $dem++;
-            $sheet->setCellValue($chars[$dem] . ($index + 4), $package['p_name']);
+            $sheet->setCellValue($chars[$dem] . ($stt + 4), $package['p_name']);
             $dem++;
-            $sheet->setCellValue($chars[$dem] . ($index + 4), "Tá» lá» %");
+            $sheet->setCellValue($chars[$dem] . ($stt + 4), "Tá» lá» %");
+        
+            $stt++;
         }
         $dem++;
         $sheet->setCellValue($chars[$dem] . ($index + 4), "Tá»ng TB");
 
-
+$stt=1;
         foreach ($data['provinces'] as $index => $provinces) {
 
-            $sheet->setCellValue('A' . ($index + 5), $provinces['stt']);
-            $sheet->setCellValue('B' . ($index + 5), $provinces['province']);
+            $sheet->setCellValue('A' . ($stt + 5), $provinces['stt']);
+            $sheet->setCellValue('B' . ($stt + 5), $provinces['province']);
             $dem = 1;
             foreach ($provinces['packages'] as $package) {
                 $dem++;
-                $sheet->setCellValue($chars[$dem] . ($index + 5), $package['total']);
+                $sheet->setCellValue($chars[$dem] . ($stt + 5), $package['total']);
                 $dem++;
-                $sheet->setCellValue($chars[$dem] . ($index + 5), $package['percent']);
+                $sheet->setCellValue($chars[$dem] . ($stt + 5), $package['percent']);
             }
             $dem++;
-            $sheet->setCellValue($chars[$dem] . ($index + 5), $provinces['total']);
+            
+            $sheet->setCellValue($chars[$dem] . ($stt + 5), $provinces['total']);
+            $stt++;
         }
         $writer = new PHPExcel_Writer_Excel5($this->phpexcel);
Index: /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 754)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 755)
@@ -48,19 +48,19 @@
         
 
-
+        $dem=1;
         foreach ($provinces as $index2 => $province) {
-            $provinces[$index2] = array("stt" => ($index2 + 1), "province" => $province, "dtn" => 0, "dtt" => 0, "dtng" => 0, "tbn" => 0, "tbt" => 0, "tbng" => 0);
+            $provinces[$index2] = array("stt" => ($dem), "province" => $province, "dtn" => 0, "dtt" => 0, "dtng" => 0, "tbn" => 0, "tbt" => 0, "tbng" => 0);
             foreach ($dtns as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['dtn'] = $data['total'];
                 }
             } 
             foreach ($dtng as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['dtng'] = $data['total'];
                 }
             }
             foreach ($dtts as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['dtt'] = $data['total'];
                     
@@ -71,18 +71,19 @@
 
             foreach ($tbns as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['tbn'] = $data['total'];
                 }
             }
             foreach ($tbng as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['tbng'] = $data['total'];
                 }
             }
             foreach ($tbts as $data) {
-                if ($province == $data['province']) {
+                if ($index2 == $data['province']) {
                     $provinces[$index2]['tbt'] = $data['total'];
                 }
             }
+            $dem++;
         }
        
@@ -114,7 +115,7 @@
             $provinces[$index] = array("province" => $province);
         }
-
+        $dem=1;
         foreach ($provinces as $index => $province) {
-            $provinces[$index]['stt'] = $index + 1;
+            $provinces[$index]['stt'] = $dem;
             $provinces[$index]['total'] = 0;
             $totaluser = 0;
@@ -124,5 +125,5 @@
                 $total = 0;
                 foreach ($package['users'] as $user) {
-                    if ($province['province'] == $user['province']) {
+                    if ($index == $user['province']) {
                         $total = $total + 1;
                         $totaluser = $totaluser + 1;
@@ -134,4 +135,5 @@
                 }
             }
+            $dem++;
         }
         foreach ($provinces as $index => $province) {
@@ -158,5 +160,5 @@
     {
        // $input['month']=1;
-       // $input['year']=2014;
+       //svn  $input['year']=2014;
         $data=$this->getPackages($input);
         return $data;
