Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php	(revision 478)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php	(revision 479)
@@ -6,5 +6,5 @@
 class Report extends MX_Controller {
 
-const TOKENPW = 'violet';
+    const TOKENPW = 'violet';
 
     public function __construct() {
@@ -193,10 +193,10 @@
     }
 
-    public function get_username($us_id) {
+    private function get_username($us_id) {
         $src = 'violet';
         $token = md5($us_id . self::TOKENPW);
         $this->load->model('user_model');
         $data = $this->user_model->get_user_info($src, $us_id, $token);
-        if (strlen($data) > 0) {
+        if (strpos($data, '&')) {
             $arr_users = explode("&", $data);
             $str_username = $arr_users[1];
@@ -210,17 +210,17 @@
     public function test() {
 
-/*
-        for ($i = 1; $i <= 5000; $i++) {
-            $input['us_id'] = rand(1, 100);
-            $input['paid_type'] = rand(1, 2);
-            $input['amount'] = rand(3, 10) * 1000;
-            $time = (rand((time() - (12 * 30 * 24 * 60 * 60)), time()));
-            $input['paid_time'] = date("Y-m-d H:i:s", $time);
-            $this->load->model('paidlog_model');
-            $this->paidlog_model->insert($input);
-        }
-
-        die();
-*/
+        /*
+          for ($i = 1; $i <= 5000; $i++) {
+          $input['us_id'] = rand(1, 100);
+          $input['paid_type'] = rand(1, 2);
+          $input['amount'] = rand(3, 10) * 1000;
+          $time = (rand((time() - (12 * 30 * 24 * 60 * 60)), time()));
+          $input['paid_time'] = date("Y-m-d H:i:s", $time);
+          $this->load->model('paidlog_model');
+          $this->paidlog_model->insert($input);
+          }
+
+          die();
+         */
         for ($i = 1; $i <= 200; $i++) {
             $input['us_id'] = $i;
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php	(revision 478)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php	(revision 479)
@@ -6,5 +6,5 @@
 class ReportAsistant extends MX_Controller {
 
-const TOKENPW = 'violet';
+    const TOKENPW = 'violet';
 
     public function __construct() {
@@ -24,14 +24,14 @@
         }
     }
-    public function viewAsistant()
-    { 
+
+    public function viewAsistant() {
         $data = array();
-        
+
         $admin_info = $this->session->userdata('adminInfo');
         if ($admin_info) {
-            $id=$this->uri->segment(3);
-             $data['id']=$id;
+            $id = $this->uri->segment(3);
+            $data['id'] = $id;
             $data['statistics'] = $this->getStatistics($id);
-            $data['content'] = $this->getCollaboratorsUsers(array(),$id);
+            $data['content'] = $this->getCollaboratorsUsers(array(), $id);
             $this->load->view('reportAsistant/indexCollaborator', $data);
         } else {
@@ -40,5 +40,5 @@
     }
 
-    public function getStatistics($id=false) {
+    public function getStatistics($id = false) {
         $data = array();
 
@@ -46,30 +46,23 @@
 
         $this->load->model('collabolator_model');
-        $collaborators = $this->collabolator_model->getAllCollaboratorUser($this_year['start'],$id);
-        for ($i=1;$i<=12;$i++)
-            {
-            $statistics[$i]=0;
-            }
-        $y=date("Y");
+        $collaborators = $this->collabolator_model->getAllCollaboratorUser($this_year['start'], $id);
+        for ($i = 1; $i <= 12; $i++) {
+            $statistics[$i] = 0;
+        }
+        $y = date("Y");
         foreach ($collaborators as $collaborator) {
-            for ($i=1;$i<=12;$i++)
-            {
-                if ($i<12)
-                {
-                if (($collaborator['time'] > strtotime($y."-".$i."-1 00:00:00")) && (($collaborator['time'] < strtotime($y."-".($i+1)."-1 00:00:00"))))
-                {
-                    $statistics[$i]++;
+            for ($i = 1; $i <= 12; $i++) {
+                if ($i < 12) {
+                    if (($collaborator['time'] > strtotime($y . "-" . $i . "-1 00:00:00")) && (($collaborator['time'] < strtotime($y . "-" . ($i + 1) . "-1 00:00:00")))) {
+                        $statistics[$i] ++;
+                    }
+                } else {
+                    if (($collaborator['time'] > strtotime($y . "-" . $i . "-1 00:00:00")) && (($collaborator['time'] < strtotime(($y + 1) . "-1-1 00:00:00")))) {
+                        $statistics[$i] ++;
+                    }
                 }
-                }
-                else
-                {
-                 if (($collaborator['time'] > strtotime($y."-".$i."-1 00:00:00")) && (($collaborator['time'] < strtotime(($y+1)."-1-1 00:00:00"))))
-                {
-                    $statistics[$i]++;
-                }   
-                }
-            }
-        }
-        
+            }
+        }
+
         $max = 0;
         foreach ($statistics as $index => $total) {
@@ -149,21 +142,19 @@
         return $this->load->view('reportAsistant/listview', $data, true);
     }
-    
-    public function getCollaboratorsUsers($filters = array(),$id=false) {
-    
+
+    public function getCollaboratorsUsers($filters = array(), $id = false) {
+
         $this->load->helper('pagging');
         $this->load->model('collabolator_model');
         $data['current_page'] = $this->uri->segment(5, 1);
-  
+
         $data['itemsoptions'] = array(10, 25, 50, 100);
         $data['perpage'] = 10;
-        if (!$id)
-        {
-            $data['id']= $this->uri->segment(4, 1);
-        }
-        else {
-        $data['id']=$id;
-        }
-              
+        if (!$id) {
+            $data['id'] = $this->uri->segment(4, 1);
+        } else {
+            $data['id'] = $id;
+        }
+
         $data['keyword'] = "";
         $data['sorting_order'] = "sorting_desc";
@@ -191,6 +182,9 @@
         $data['total'] = $this->collabolator_model->countCountCollaboratorUsers($data);
         $data['paidlogs'] = $this->collabolator_model->getCountCollaboratorUsers($data);
-
-        $data['paging_url'] = base_url() . "/admin/thong_ke_cong_tac_vien/trang_ctv/".$data['id'];
+        foreach ($data['paidlogs'] as $index=>$paidlog)
+        {
+            $data['paidlogs'][$index]['username']=$this->get_username($paidlog['us_id']);
+        }
+        $data['paging_url'] = base_url() . "/admin/thong_ke_cong_tac_vien/trang_ctv/" . $data['id'];
         $data['num_links'] = 2;
         $data['paging'] = pagging($data);
@@ -202,11 +196,10 @@
     }
 
-    public function get_username($us_id) {
+    private function get_username($us_id) {
         $src = 'violet';
         $token = md5($us_id . self::TOKENPW);
         $this->load->model('user_model');
         $data = $this->user_model->get_user_info($src, $us_id, $token);
-       
-        if (strlen($data) > 0) {
+        if (strpos($data, '&')) {
             $arr_users = explode("&", $data);
             $str_username = $arr_users[1];
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/listview_user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/listview_user.php	(revision 478)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/listview_user.php	(revision 479)
@@ -54,5 +54,5 @@
 
                                 <td class=" ">
-
+<?php echo $paidlog['username']; ?>
                                     
                                 </td>
