Changeset 777
- Timestamp:
- Mar 3, 2015 4:43:43 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php
r767 r777 79 79 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 80 80 $data['total'] = $this->paidlog_model->countPaidlog($data); 81 $data['paidlogs'] = $this->paidlog_model->getPaidlogs($data); 82 81 $data['paidlogs'] = $this->paidlog_model->getPaidlogs($data)['paid_logs']; 82 $data['total_amount'] = $this->paidlog_model->getPaidlogs($data)['total_amount']; 83 83 84 $data['paging_url'] = base_url() . "/admin/doanh_thu_tong_hop/trang/"; 84 85 $data['num_links'] = 2; -
pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php
r767 r777 13 13 } 14 14 function getPaidlogs($data) { 15 if ($data['paid_type'] == 0){ 16 $sql = "SELECT SUM(amount) as total_amount FROM tblpaidlog"; 17 }else{ 18 $sql = "SELECT SUM(amount) as total_amount FROM tblpaidlog WHERE paid_type = ".$data['paid_type']; 19 } 20 $r = $this->db->query($sql)->row_array(); 21 $total_amount = (int)$r['total_amount']; 15 22 $sql = "SELECT * FROM " . $this->table_name. " INNER JOIN tbluser ON tbluser.us_id = tblpaidlog.us_id "; 16 23 if ($data['paid_type'] == 1){ … … 47 54 } 48 55 $sql=$sql . " " . $order . " LIMIT " . $data['start'] . ", " . $data['perpage'] . " "; 49 return $this->db->query($sql)->result_array(); 56 //return $this->db->query($sql)->result_array(); 57 $re = $this->db->query($sql)->result_array(); 58 $result['paid_logs'] = $re; 59 $result['total_amount'] = $total_amount; 60 return $result; 50 61 } 51 62 -
pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php
r690 r777 210 210 </div><!-- /.modal-dialog --> 211 211 <?php 212 $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/report.js' )));212 $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/report.js', 'assets/js/admin/user.js'))); 213 213 ?> -
pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php
r767 r777 66 66 67 67 <td class=" "> 68 <a href="#"><?php echo $paidlog['username'];?></a>68 <a onclick="getUserHistory(<?php echo $paidlog['us_id']; ?>, 1);" data-toggle="modal"><?php echo $paidlog['username'];?></a> 69 69 </td> 70 70 <td class=" "><?php echo $paidlog['cellphone']?></td> … … 85 85 86 86 87 87 <tr> 88 <td colspan=2> 89 Tổng tiền 90 </td> 91 <td colspan=3> 92 <?php echo $total_amount; ?> 93 </td> 94 </tr> 88 95 </tbody></table><div class="row"><div class="col-sm-6"> 89 96 <div class="dataTables_info" id="sample-table-2_info">Hiển thị <?php echo ($start+1)?> đến <?php echo ($start+$perpage)?> của <?php echo $total?> bản ghi</div> … … 104 111 105 112 </div> 106 113 <!-- Modal User History --> 114 <div class="modal fade" id="user-history" tabindex="-1" role="dialog"aria-hidden="true"> 115 <div class="modal-dialog"> 116 <div class="modal-content"> 117 <div class="modal-header"> 118 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 119 <h4 class="modal-title">Lịch sử</h4> 120 </div> 121 <div class="modal-body"> 122 <ul class="nav nav-tabs padding-16"> 123 <li class="active" > 124 <a id="regis-tab" href="#regis" data-toggle="tab"> 125 Giao dịch 126 </a> 127 </li> 128 <li> 129 <a id="trade-tab" href="#trade" data-toggle="tab"> 130 Thông tin 131 </a> 132 </li> 133 </ul> 134 <div class="tab-content history-tab-content"> 135 <div class="tab-pane in active" id="regis"> 136 <div class="table-responsive"> 137 <table id="sample-table-1" class="table table-striped table-bordered table-hover"> 138 <thead> 139 <tr> 140 <th class="center"> 141 Từ 142 </th> 143 <th class="center"> Số tiền (VNĐ) </th> 144 <th class="center"> Gói dịch vụ </th> 145 <th> 146 <i class="icon-time bigger-110 hidden-480"></i> 147 Thời gian 148 </th> 149 </tr> 150 </thead> 151 <tbody id="content-regis-histoty"> 152 </tbody> 153 </table> 154 <div> 155 <div class="dataTables_paginate paging_bootstrap"> 156 <ul class="pagination" id="regis-pagination"> 157 </ul> 158 </div> 159 </div> 160 </div><!-- /.table-responsive --> 161 </div> 162 <div class="tab-pane" id="trade"> 163 <div class="row"> 164 165 <div id="content-trade-histoty"> 166 </div> 167 168 </div> 169 </div><!-- /.table-responsive --> 170 </div> 171 </div> 172 </div><!-- Modal Body --> 173 </div> <!-- Modal Content --> 174 </div> 107 175 108 176 <script type="text/javascript">
Note: See TracChangeset
for help on using the changeset viewer.