Index: pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 643)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 644)
@@ -119,5 +119,6 @@
                                 </td>
 								<td class=" ">
-                                    <a><?php echo @$user['username']; ?></a>
+                                    <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo @$user['username']; ?></a>
+									 <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>-->
                                 </td>
                                 <td class=" ">
@@ -161,4 +162,85 @@
     </div><!-- /.col -->
 </div>
+
+<!-- Modal User History -->
+<div class="modal fade" id="user-history" tabindex="-1" role="dialog"aria-hidden="true">
+	<div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                <h4 class="modal-title">Lá»ch sá»­</h4>
+            </div>
+			<div class="modal-body">
+				<ul class="nav nav-tabs padding-16"> 
+					<li class="active" >
+						<a id="regis-tab" href="#regis" data-toggle="tab">
+							ÄÄng kÃœ dá»ch vá»¥
+						</a>
+					</li>
+					<li>
+						<a id="trade-tab" href="#trade" data-toggle="tab">
+							Giao dá»ch
+						</a>
+					</li>
+				</ul>
+				<div class="tab-content history-tab-content">
+					<div class="tab-pane in active" id="regis">
+						<div class="table-responsive">
+							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
+								<thead>
+									<tr>
+										<th class="center">
+											Tá»«
+										</th>
+										<th class="center"> GÃ³i dá»ch vá»¥ </th>
+										<th>
+											<i class="icon-time bigger-110 hidden-480"></i>
+											Thá»i gian
+										</th>
+									</tr>
+								</thead>
+								<tbody id="content-regis-histoty">
+								</tbody>
+							</table>
+							<div>
+								<div class="dataTables_paginate paging_bootstrap">
+									<ul class="pagination" id="regis-pagination">
+									</ul>
+								</div>
+							</div>
+						</div><!-- /.table-responsive -->
+					</div>
+					<div class="tab-pane" id="trade">
+						<div class="table-responsive">
+							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
+								<thead>
+									<tr>
+										<th class="center">
+											Tá»«
+										</th>
+										<th class="center">Sá» tiá»n (VNÄ)</th>
+										<th>
+											<i class="icon-time bigger-110 hidden-480"></i>
+											Thá»i gian
+										</th>
+									</tr>
+								</thead>
+								<tbody id="content-trade-histoty">
+								</tbody>
+							</table>
+							<div>
+								<div class="dataTables_paginate paging_bootstrap">
+									<ul class="pagination" id="trade-pagination">
+									</ul>
+								</div>
+							</div>
+						</div><!-- /.table-responsive -->
+					</div>
+				</div>
+			</div><!-- Modal Body -->
+		</div> <!-- Modal Content -->
+	</div>
+</div>
+
 <script type="text/javascript">
     window.onload = function ()
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 643)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 644)
@@ -387,5 +387,4 @@
 			$packagelogs = array();
 			foreach ($result as $packagelog):
-				$packagelog['vip_name'] = 'VIP '.$packagelog['p_code'];
 				$packagelog['created_time'] = date('d/m/Y H:i:s', strtotime($packagelog['created_time']));
 				array_push($packagelogs, $packagelog);
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 643)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 644)
@@ -534,5 +534,5 @@
 		$username = $data['username'];
 		$this->db->query ( 'UNLOCK TABLES' );
-		$sql = "SELECT * FROM tblregisterpackagelog where username = ? ORDER BY created_time DESC LIMIT ".$data['start'].", ".$data['perpage']." ";
+		$sql = "SELECT * FROM tblregisterpackagelog INNER JOIN tblservicepackage ON tblservicepackage.p_code = tblregisterpackagelog.p_code where username = ? ORDER BY created_time DESC LIMIT ".$data['start'].", ".$data['perpage']." ";
 		$query = $this->db->query ( $sql, array (
 				$username
