Index: /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportprovince.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportprovince.php	(revision 744)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportprovince.php	(revision 745)
@@ -79,5 +79,6 @@
         $sheet->getColumnDimension('H')->setWidth(15);
         $sheet->setCellValue('A1', "BÃ¡o cÃ¡o thuÃª bao theo tá»nh");
-        $sheet->setCellValue('A2', "Thá»i gian: " . $data['month'] . " - " . $data['year']);
+        $sheet->setCellValue('A2', "ThÃ¡ng: " . $data['month'] . " - " . $data['year']);
+        $sheet->setCellValue('C2', "NgÃ y: ".date('d')." - ".date('m')." - ". date('Y')."");
         $sheet->setCellValue('A4', "STT");
         $sheet->setCellValue('B4', "Tá»nh/ThÃ nh phá»");
Index: /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 744)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 745)
@@ -23,8 +23,12 @@
         $dtns = $query->result_array();
         // tinh doanh thu theo thang
-        $sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE tblpaidlog.paid_time >'" . $input['year'] . "-" . $input['month'] . "-01' AND tblpaidlog.paid_time <'" . $input['year'] . "-" . $input['month'] . "-31' GROUP BY tbluser.province";
+        $sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE tblpaidlog.paid_time >'" . $input['year'] . "-" . $input['month'] . "-01'  GROUP BY tbluser.province";
         $query = $this->db->query($sql);
         $dtts = $query->result_array();
-
+        // tinh doanh thu trong ngay hien tai
+        $sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE tblpaidlog.paid_time > '" . date('Y') . "-" . date('m') . "-".date('d')." 00:00:00' AND  tblpaidlog.paid_time <'" . date('Y') . "-" . date('m') . "-".date('d')." 23:59:59'  GROUP BY tbluser.province";
+       
+        $query = $this->db->query($sql);
+        $dtng = $query->result_array();
 
         // Tinh thue bao theo tinh theo nam
@@ -34,7 +38,13 @@
 
         // tinh thue bao theo thang
-        $sql = "SELECT *,count(us_id) as total FROM tbluser WHERE tbluser.created_time >'" . $input['year'] . "-" . $input['month'] . "-01' AND tbluser.created_time <'" . $input['year'] . "-" . $input['month'] . "-31' GROUP BY tbluser.province";
+        $sql = "SELECT *,count(us_id) as total FROM tbluser WHERE tbluser.created_time >'" . $input['year'] . "-" . $input['month'] . "-01'  GROUP BY tbluser.province";
         $query = $this->db->query($sql);
         $tbts = $query->result_array();
+        
+         // tinh thue bao theo ngay
+        $sql = "SELECT *,count(us_id) as total FROM tbluser WHERE tbluser.created_time >'" . date('Y') . "-" . date('m') . "-".date('d')." 00:00:00' AND tbluser.created_time < '" . date('Y') . "-" . date('m') . "-".date('d')." 23:59:59'  GROUP BY tbluser.province";
+        $query = $this->db->query($sql);
+        $tbng = $query->result_array();
+        
 
 
@@ -45,9 +55,14 @@
                     $provinces[$index2]['dtn'] = $data['total'];
                 }
+            } 
+            foreach ($dtng as $data) {
+                if ($province == $data['province']) {
+                    $provinces[$index2]['dtng'] = $data['total'];
+                }
             }
             foreach ($dtts as $data) {
                 if ($province == $data['province']) {
                     $provinces[$index2]['dtt'] = $data['total'];
-                    $provinces[$index2]['dtng'] = round($data['total'] / $input['month_days'], 2);
+                    
                 }
             }
@@ -60,8 +75,12 @@
                 }
             }
+            foreach ($tbng as $data) {
+                if ($province == $data['province']) {
+                    $provinces[$index2]['tbng'] = $data['total'];
+                }
+            }
             foreach ($tbts as $data) {
                 if ($province == $data['province']) {
                     $provinces[$index2]['tbt'] = $data['total'];
-                    $provinces[$index2]['tbng'] = round($data['total'] / $input['month_days'], 2);
                 }
             }
