1 reports page to rule them all
This commit is contained in:
parent
c0a232797a
commit
e53fe225cc
@ -20,8 +20,8 @@ class Http
|
|||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_POST, 0);
|
curl_setopt($ch, CURLOPT_POST, 0);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
|
||||||
if (is_array($headers) && count($headers) > 0) {
|
if (is_array($headers) && count($headers) > 0) {
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
}
|
}
|
||||||
@ -56,8 +56,8 @@ class Http
|
|||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
|
||||||
curl_setopt($ch, CURLOPT_VERBOSE, false);
|
curl_setopt($ch, CURLOPT_VERBOSE, false);
|
||||||
curl_setopt($ch, CURLINFO_HEADER_OUT, false);
|
curl_setopt($ch, CURLINFO_HEADER_OUT, false);
|
||||||
if (!empty($http_proxy)) {
|
if (!empty($http_proxy)) {
|
||||||
@ -99,8 +99,8 @@ class Http
|
|||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
|
||||||
curl_setopt($ch, CURLOPT_VERBOSE, false);
|
curl_setopt($ch, CURLOPT_VERBOSE, false);
|
||||||
curl_setopt($ch, CURLINFO_HEADER_OUT, false);
|
curl_setopt($ch, CURLINFO_HEADER_OUT, false);
|
||||||
if (!empty($http_proxy)) {
|
if (!empty($http_proxy)) {
|
||||||
|
@ -28,16 +28,56 @@ switch ($action) {
|
|||||||
|
|
||||||
case 'print-by-date':
|
case 'print-by-date':
|
||||||
$mdate = date('Y-m-d');
|
$mdate = date('Y-m-d');
|
||||||
$d = ORM::for_table('tbl_transactions');
|
$types = ORM::for_table('tbl_transactions')->getEnum('type');
|
||||||
$d->where('recharged_on', $mdate);
|
$methods = array_column(ORM::for_table('tbl_transactions')->rawQuery("SELECT DISTINCT SUBSTRING_INDEX(`method`, ' - ', 1) as method FROM tbl_transactions;")->findArray(), 'method');
|
||||||
$d->order_by_desc('id');
|
$routers = array_column(ORM::for_table('tbl_transactions')->select('routers')->distinct('routers')->find_array(), 'routers');
|
||||||
$x = $d->find_many();
|
$plans = array_column(ORM::for_table('tbl_transactions')->select('plan_name')->distinct('plan_name')->find_array(), 'plan_name');
|
||||||
|
$reset_day = $config['reset_day'];
|
||||||
|
if (empty($reset_day)) {
|
||||||
|
$reset_day = 1;
|
||||||
|
}
|
||||||
|
//first day of month
|
||||||
|
if (date("d") >= $reset_day) {
|
||||||
|
$start_date = date('Y-m-' . $reset_day);
|
||||||
|
} else {
|
||||||
|
$start_date = date('Y-m-' . $reset_day, strtotime("-1 MONTH"));
|
||||||
|
}
|
||||||
|
$tps = ($_GET['tps']) ? $_GET['tps'] : $types;
|
||||||
|
$mts = ($_GET['mts']) ? $_GET['mts'] : $methods;
|
||||||
|
$rts = ($_GET['rts']) ? $_GET['rts'] : $routers;
|
||||||
|
$plns = ($_GET['plns']) ? $_GET['plns'] : $plans;
|
||||||
|
$sd = _req('sd', $start_date);
|
||||||
|
$ed = _req('ed', $mdate);
|
||||||
|
$ts = _req('ts', '00:00:00');
|
||||||
|
$te = _req('te', '23:59:59');
|
||||||
|
|
||||||
$dr = ORM::for_table('tbl_transactions');
|
$query = ORM::for_table('tbl_transactions')
|
||||||
$dr->where('recharged_on', $mdate);
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) >= " . strtotime("$sd $ts"))
|
||||||
$dr->order_by_desc('id');
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) <= " . strtotime("$ed $te"))
|
||||||
$xy = $dr->sum('price');
|
->order_by_desc('id');
|
||||||
|
if (count($tps) > 0) {
|
||||||
|
$query->where_in('type', $tps);
|
||||||
|
}
|
||||||
|
if (count($mts) > 0) {
|
||||||
|
if (count($mts) != count($methods)) {
|
||||||
|
foreach ($mts as $mt) {
|
||||||
|
$query->where_like('method', "$mt - %");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($rts) > 0) {
|
||||||
|
$query->where_in('routers', $rts);
|
||||||
|
}
|
||||||
|
if (count($plns) > 0) {
|
||||||
|
$query->where_in('plan_name', $plns);
|
||||||
|
}
|
||||||
|
$x = $query->find_array();
|
||||||
|
$xy = $query->sum('price');
|
||||||
|
|
||||||
|
$ui->assign('sd', $sd);
|
||||||
|
$ui->assign('ed', $ed);
|
||||||
|
$ui->assign('ts', $ts);
|
||||||
|
$ui->assign('te', $te);
|
||||||
$ui->assign('d', $x);
|
$ui->assign('d', $x);
|
||||||
$ui->assign('dr', $xy);
|
$ui->assign('dr', $xy);
|
||||||
$ui->assign('mdate', $mdate);
|
$ui->assign('mdate', $mdate);
|
||||||
@ -48,16 +88,51 @@ switch ($action) {
|
|||||||
|
|
||||||
case 'pdf-by-date':
|
case 'pdf-by-date':
|
||||||
$mdate = date('Y-m-d');
|
$mdate = date('Y-m-d');
|
||||||
|
$types = ORM::for_table('tbl_transactions')->getEnum('type');
|
||||||
|
$methods = array_column(ORM::for_table('tbl_transactions')->rawQuery("SELECT DISTINCT SUBSTRING_INDEX(`method`, ' - ', 1) as method FROM tbl_transactions;")->findArray(), 'method');
|
||||||
|
$routers = array_column(ORM::for_table('tbl_transactions')->select('routers')->distinct('routers')->find_array(), 'routers');
|
||||||
|
$plans = array_column(ORM::for_table('tbl_transactions')->select('plan_name')->distinct('plan_name')->find_array(), 'plan_name');
|
||||||
|
$reset_day = $config['reset_day'];
|
||||||
|
if (empty($reset_day)) {
|
||||||
|
$reset_day = 1;
|
||||||
|
}
|
||||||
|
//first day of month
|
||||||
|
if (date("d") >= $reset_day) {
|
||||||
|
$start_date = date('Y-m-' . $reset_day);
|
||||||
|
} else {
|
||||||
|
$start_date = date('Y-m-' . $reset_day, strtotime("-1 MONTH"));
|
||||||
|
}
|
||||||
|
$tps = ($_GET['tps']) ? $_GET['tps'] : $types;
|
||||||
|
$mts = ($_GET['mts']) ? $_GET['mts'] : $methods;
|
||||||
|
$rts = ($_GET['rts']) ? $_GET['rts'] : $routers;
|
||||||
|
$plns = ($_GET['plns']) ? $_GET['plns'] : $plans;
|
||||||
|
$sd = _req('sd', $start_date);
|
||||||
|
$ed = _req('ed', $mdate);
|
||||||
|
$ts = _req('ts', '00:00:00');
|
||||||
|
$te = _req('te', '23:59:59');
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_transactions');
|
$query = ORM::for_table('tbl_transactions')
|
||||||
$d->where('recharged_on', $mdate);
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) >= " . strtotime("$sd $ts"))
|
||||||
$d->order_by_desc('id');
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) <= " . strtotime("$ed $te"))
|
||||||
$x = $d->find_many();
|
->order_by_desc('id');
|
||||||
|
if (count($tps) > 0) {
|
||||||
$dr = ORM::for_table('tbl_transactions');
|
$query->where_in('type', $tps);
|
||||||
$dr->where('recharged_on', $mdate);
|
}
|
||||||
$dr->order_by_desc('id');
|
if (count($mts) > 0) {
|
||||||
$xy = $dr->sum('price');
|
if (count($mts) != count($methods)) {
|
||||||
|
foreach ($mts as $mt) {
|
||||||
|
$query->where_like('method', "$mt - %");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($rts) > 0) {
|
||||||
|
$query->where_in('routers', $rts);
|
||||||
|
}
|
||||||
|
if (count($plns) > 0) {
|
||||||
|
$query->where_in('plan_name', $plns);
|
||||||
|
}
|
||||||
|
$x = $query->find_array();
|
||||||
|
$xy = $query->sum('price');
|
||||||
|
|
||||||
$title = ' Reports [' . $mdate . ']';
|
$title = ' Reports [' . $mdate . ']';
|
||||||
$title = str_replace('-', ' ', $title);
|
$title = str_replace('-', ' ', $title);
|
||||||
@ -79,7 +154,7 @@ switch ($action) {
|
|||||||
</div>
|
</div>
|
||||||
<div id="logo"><img id="image" src="' . $logo . '" alt="logo" /></div>
|
<div id="logo"><img id="image" src="' . $logo . '" alt="logo" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="header">' . Lang::T('All Transactions at Date') . ': ' . date($config['date_format'], strtotime($mdate)) . '</div>
|
<div id="header">' . Lang::T('All Transactions at Date') . ': ' . Lang::dateAndTimeFormat($sd, $ts) .' - '. Lang::dateAndTimeFormat($ed, $te) . '</div>
|
||||||
<table id="customers">
|
<table id="customers">
|
||||||
<tr>
|
<tr>
|
||||||
<th>' . Lang::T('Username') . '</th>
|
<th>' . Lang::T('Username') . '</th>
|
||||||
@ -98,8 +173,8 @@ switch ($action) {
|
|||||||
$plan_name = $value['plan_name'];
|
$plan_name = $value['plan_name'];
|
||||||
$type = $value['type'];
|
$type = $value['type'];
|
||||||
$price = $config['currency_code'] . ' ' . number_format($value['price'], 0, $config['dec_point'], $config['thousands_sep']);
|
$price = $config['currency_code'] . ' ' . number_format($value['price'], 0, $config['dec_point'], $config['thousands_sep']);
|
||||||
$recharged_on = date($config['date_format'], strtotime($value['recharged_on']));
|
$recharged_on = Lang::dateAndTimeFormat($value['recharged_on'], $value['recharged_time']);
|
||||||
$expiration = date($config['date_format'], strtotime($value['expiration']));
|
$expiration = Lang::dateAndTimeFormat($value['expiration'], $value['time']);
|
||||||
$time = $value['time'];
|
$time = $value['time'];
|
||||||
$method = $value['method'];
|
$method = $value['method'];
|
||||||
$routers = $value['routers'];
|
$routers = $value['routers'];
|
||||||
@ -110,7 +185,7 @@ switch ($action) {
|
|||||||
<td>$type</td>
|
<td>$type</td>
|
||||||
<td align='right'>$price</td>
|
<td align='right'>$price</td>
|
||||||
<td>$recharged_on</td>
|
<td>$recharged_on</td>
|
||||||
<td>$expiration $time </td>
|
<td>$expiration</td>
|
||||||
<td>$method</td>
|
<td>$method</td>
|
||||||
<td>$routers</td>
|
<td>$routers</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
@ -170,7 +245,7 @@ $style
|
|||||||
$html
|
$html
|
||||||
EOF;
|
EOF;
|
||||||
$mpdf->WriteHTML($nhtml);
|
$mpdf->WriteHTML($nhtml);
|
||||||
$mpdf->Output(date('Ymd_His') . '.pdf', 'D');
|
$mpdf->Output('phpnuxbill_reports_'.date('Ymd_His') . '.pdf', 'D');
|
||||||
} else {
|
} else {
|
||||||
echo 'No Data';
|
echo 'No Data';
|
||||||
}
|
}
|
||||||
|
@ -41,18 +41,6 @@ switch ($action) {
|
|||||||
$ui->assign('q', $q);
|
$ui->assign('q', $q);
|
||||||
$ui->display('reports-activation.tpl');
|
$ui->display('reports-activation.tpl');
|
||||||
break;
|
break;
|
||||||
case 'daily-report':
|
|
||||||
$query = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->order_by_desc('id');
|
|
||||||
$d = Paginator::findMany($query);
|
|
||||||
$dr = $query->sum('price');
|
|
||||||
|
|
||||||
$ui->assign('d', $d);
|
|
||||||
$ui->assign('dr', $dr);
|
|
||||||
$ui->assign('mdate', $mdate);
|
|
||||||
$ui->assign('mtime', $mtime);
|
|
||||||
run_hook('view_daily_reports'); #HOOK
|
|
||||||
$ui->display('reports-daily.tpl');
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'by-period':
|
case 'by-period':
|
||||||
$ui->assign('mdate', $mdate);
|
$ui->assign('mdate', $mdate);
|
||||||
@ -95,6 +83,77 @@ switch ($action) {
|
|||||||
$ui->display('reports-period-view.tpl');
|
$ui->display('reports-period-view.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'daily-report':
|
||||||
default:
|
default:
|
||||||
$ui->display('a404.tpl');
|
$types = ORM::for_table('tbl_transactions')->getEnum('type');
|
||||||
|
$methods = array_column(ORM::for_table('tbl_transactions')->rawQuery("SELECT DISTINCT SUBSTRING_INDEX(`method`, ' - ', 1) as method FROM tbl_transactions;")->findArray(), 'method');
|
||||||
|
$routers = array_column(ORM::for_table('tbl_transactions')->select('routers')->distinct('routers')->find_array(), 'routers');
|
||||||
|
$plans = array_column(ORM::for_table('tbl_transactions')->select('plan_name')->distinct('plan_name')->find_array(), 'plan_name');
|
||||||
|
$reset_day = $config['reset_day'];
|
||||||
|
if (empty($reset_day)) {
|
||||||
|
$reset_day = 1;
|
||||||
|
}
|
||||||
|
//first day of month
|
||||||
|
if (date("d") >= $reset_day) {
|
||||||
|
$start_date = date('Y-m-' . $reset_day);
|
||||||
|
} else {
|
||||||
|
$start_date = date('Y-m-' . $reset_day, strtotime("-1 MONTH"));
|
||||||
|
}
|
||||||
|
$tps = ($_GET['tps']) ? $_GET['tps'] : $types;
|
||||||
|
$mts = ($_GET['mts']) ? $_GET['mts'] : $methods;
|
||||||
|
$rts = ($_GET['rts']) ? $_GET['rts'] : $routers;
|
||||||
|
$plns = ($_GET['plns']) ? $_GET['plns'] : $plans;
|
||||||
|
$sd = _req('sd', $start_date);
|
||||||
|
$ed = _req('ed', $mdate);
|
||||||
|
$ts = _req('ts', '00:00:00');
|
||||||
|
$te = _req('te', '23:59:59');
|
||||||
|
$urlquery = str_replace('_route=reports&', '', $_SERVER['QUERY_STRING']);
|
||||||
|
|
||||||
|
|
||||||
|
$query = ORM::for_table('tbl_transactions')
|
||||||
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) >= " . strtotime("$sd $ts"))
|
||||||
|
->whereRaw("UNIX_TIMESTAMP(CONCAT(`recharged_on`,' ',`recharged_time`)) <= " . strtotime("$ed $te"))
|
||||||
|
->order_by_desc('id');
|
||||||
|
if (count($tps) > 0) {
|
||||||
|
$query->where_in('type', $tps);
|
||||||
|
}
|
||||||
|
if (count($mts) > 0) {
|
||||||
|
if (count($mts) != count($methods)) {
|
||||||
|
foreach ($mts as $mt) {
|
||||||
|
$query->where_like('method', "$mt - %");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($rts) > 0) {
|
||||||
|
$query->where_in('routers', $rts);
|
||||||
|
}
|
||||||
|
if (count($plns) > 0) {
|
||||||
|
$query->where_in('plan_name', $plns);
|
||||||
|
}
|
||||||
|
$d = Paginator::findMany($query, [], 100, $urlquery);
|
||||||
|
$dr = $query->sum('price');
|
||||||
|
|
||||||
|
$ui->assign('methods', $methods);
|
||||||
|
$ui->assign('types', $types);
|
||||||
|
$ui->assign('routers', $routers);
|
||||||
|
$ui->assign('plans', $plans);
|
||||||
|
$ui->assign('filter', $urlquery);
|
||||||
|
|
||||||
|
// time
|
||||||
|
$ui->assign('sd', $sd);
|
||||||
|
$ui->assign('ed', $ed);
|
||||||
|
$ui->assign('ts', $ts);
|
||||||
|
$ui->assign('te', $te);
|
||||||
|
|
||||||
|
$ui->assign('mts', $mts);
|
||||||
|
$ui->assign('tps', $tps);
|
||||||
|
$ui->assign('rts', $rts);
|
||||||
|
$ui->assign('plns', $plns);
|
||||||
|
|
||||||
|
$ui->assign('d', $d);
|
||||||
|
$ui->assign('dr', $dr);
|
||||||
|
$ui->assign('mdate', $mdate);
|
||||||
|
run_hook('view_daily_reports'); #HOOK
|
||||||
|
$ui->display('reports-daily.tpl');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
@ -662,5 +662,15 @@
|
|||||||
"": "",
|
"": "",
|
||||||
"Additional_Billing": "Additional Billing",
|
"Additional_Billing": "Additional Billing",
|
||||||
"_": "-",
|
"_": "-",
|
||||||
"Used_Date": "Used Date"
|
"Used_Date": "Used Date",
|
||||||
|
"Filter": "Filter",
|
||||||
|
"Start_time": "Start time",
|
||||||
|
"End_Time": "End Time",
|
||||||
|
"Internet_Plans": "Internet Plans",
|
||||||
|
"Methods": "Methods",
|
||||||
|
"Hap_Lite": "Hap Lite",
|
||||||
|
"balance": "balance",
|
||||||
|
"radius": "radius",
|
||||||
|
"Start_Date": "Start Date",
|
||||||
|
"End_Date": "End Date"
|
||||||
}
|
}
|
@ -22,7 +22,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="printable">
|
<div id="printable">
|
||||||
<h4>{Lang::T('All Transactions at Date')}: {date($_c['date_format'], strtotime($mdate))}</h4>
|
<h4>{Lang::T('All Transactions at Date')}: {Lang::dateAndTimeFormat($sd, $ts)} - {Lang::dateAndTimeFormat($ed, $te)}</h4>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-condensed table-bordered" style="background: #ffffff">
|
<table class="table table-bordered table-condensed table-bordered" style="background: #ffffff">
|
||||||
<th class="text-center">{Lang::T('Username')}</th>
|
<th class="text-center">{Lang::T('Username')}</th>
|
||||||
|
@ -1,29 +1,65 @@
|
|||||||
{include file="sections/header.tpl"}
|
{include file="sections/header.tpl"}
|
||||||
<!-- reports-daily -->
|
<!-- reports-daily -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-lg-3">
|
||||||
<div class="invoice-wrap">
|
<form method="get" class="form">
|
||||||
<div class="clearfix invoice-head">
|
<div class="box box-primary box-solid">
|
||||||
<h3 class="brand-logo text-uppercase text-bold left mt15">
|
<div class="box-header" onclick="showFilter()" style=" cursor: pointer;">
|
||||||
<span class="text">{Lang::T('Daily Reports')}</span>
|
<h3 class="box-title">{Lang::T('Filter')}</h3>
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix invoice-subhead mb20">
|
<div id="filter_box" class="box-body hidden-xs hidden-sm hidden-md">
|
||||||
<div class="group clearfix left">
|
<input type="hidden" name="_route" value="reports">
|
||||||
<p class="text-bold mb5">{Lang::T('All Transactions at Date')}:</p>
|
<label>{Lang::T('Start Date')}</label>
|
||||||
<p class="small">{date($_c['date_format'], strtotime($mdate))} {$mtime}</p>
|
<input type="date" class="form-control" name="sd" value="{$sd}">
|
||||||
</div>
|
<label>{Lang::T('Start time')}</label>
|
||||||
<div class="group clearfix right">
|
<input type="time" class="form-control" name="ts" value="{$ts}">
|
||||||
<a href="{$_url}export/print-by-date" class="btn btn-default" target="_blank"><i
|
<label>{Lang::T('End Date')}</label>
|
||||||
class="ion ion-printer"></i>{Lang::T('Export for Print')}</a>
|
<input type="date" class="form-control" name="ed" value="{$ed}">
|
||||||
<a href="{$_url}export/pdf-by-date" class="btn btn-default"><i
|
<label>{Lang::T('End Time')}</label>
|
||||||
class="fa fa-file-pdf-o"></i>{Lang::T('Export to PDF')}</a>
|
<input type="time" class="form-control" name="te" value="{$te}">
|
||||||
|
<label>{Lang::T('Type')}</label>
|
||||||
|
<select class="form-control" name="tps[]" multiple>
|
||||||
|
{foreach $types as $type}
|
||||||
|
<option value="{$type}" {if in_array($type, $tps)}selected{/if}>{$type}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<label>{Lang::T('Internet Plans')}</label>
|
||||||
|
<select class="form-control" name="plns[]" multiple>
|
||||||
|
{foreach $plans as $plan}
|
||||||
|
<option value="{$plan}" {if in_array($plan, $plns)}selected{/if}>{$plan}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<label>{Lang::T('Methods')}</label>
|
||||||
|
<select class="form-control" name="mts[]" multiple>
|
||||||
|
{foreach $methods as $method}
|
||||||
|
<option value="{$method}" {if in_array($method, $mts)}selected{/if}>{$method}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<label>{Lang::T('Routers')}</label>
|
||||||
|
<select class="form-control" name="rts[]" multiple>
|
||||||
|
{foreach $routers as $router}
|
||||||
|
<option value="{$router}" {if in_array($router, $rts)}selected{/if}>{Lang::T($router)}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<input type="submit" class="btn btn-success btn-block">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="box box-primary box-solid">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-condensed">
|
<table class="table table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<a href="{$_url}export/print-by-date&{$filter}" class="btn btn-default" target="_blank"><i
|
||||||
|
class="ion ion-printer"></i></a>
|
||||||
|
<a href="{$_url}export/pdf-by-date&{$filter}" class="btn btn-default"><i
|
||||||
|
class="fa fa-file-pdf-o"></i></a>
|
||||||
|
</th>
|
||||||
|
<th colspan="7"></th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{Lang::T('Username')}</th>
|
<th>{Lang::T('Username')}</th>
|
||||||
<th>{Lang::T('Type')}</th>
|
<th>{Lang::T('Type')}</th>
|
||||||
@ -48,19 +84,47 @@
|
|||||||
<td>{$ds['routers']}</td>
|
<td>{$ds['routers']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
<tr>
|
||||||
|
<th>{Lang::T('Total')}</th>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
<th class="text-right">{Lang::moneyFormat($dr)}</th>
|
||||||
|
<td colspan="4"></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{include file="pagination.tpl"}
|
<div class="box-footer">
|
||||||
|
|
||||||
<div class="clearfix text-right total-sum mb10">
|
|
||||||
<h4 class="text-uppercase text-bold">{Lang::T('Total Income')}:</h4>
|
|
||||||
<h3 class="sum">{Lang::moneyFormat($dr)}</h3>
|
|
||||||
</div>
|
|
||||||
<p class="text-center small text-info">{Lang::T('All Transactions at Date')}:
|
<p class="text-center small text-info">{Lang::T('All Transactions at Date')}:
|
||||||
{date($_c['date_format'], strtotime($mdate))} {$mtime}</p>
|
{Lang::dateAndTimeFormat($sd, $ts)} - {Lang::dateAndTimeFormat($ed, $te)}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{include file="pagination.tpl"}
|
||||||
|
|
||||||
|
<div class="bs-callout bs-callout-warning bg-gray">
|
||||||
|
<h4>Information</h4>
|
||||||
|
<p>Export and Print will show all data without pagination.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var isShow = false;
|
||||||
|
|
||||||
|
function showFilter() {
|
||||||
|
if (isShow) {
|
||||||
|
$("#filter_box").addClass("hidden-xs");
|
||||||
|
$("#filter_box").addClass("hidden-sm");
|
||||||
|
$("#filter_box").addClass("hidden-md");
|
||||||
|
isShow = false;
|
||||||
|
} else {
|
||||||
|
// remove class
|
||||||
|
$("#filter_box").removeClass("hidden-xs");
|
||||||
|
$("#filter_box").removeClass("hidden-sm");
|
||||||
|
$("#filter_box").removeClass("hidden-md");
|
||||||
|
isShow = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
{include file="sections/footer.tpl"}
|
{include file="sections/footer.tpl"}
|
@ -336,10 +336,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="treeview-menu">
|
<ul class="treeview-menu">
|
||||||
<li {if $_routes[1] eq 'daily-report' }class="active" {/if}><a
|
<li {if $_system_menu eq 'reports' }class="active" {/if}><a
|
||||||
href="{$_url}reports/daily-report">{Lang::T('Daily Reports')}</a></li>
|
href="{$_url}reports">{Lang::T('Daily Reports')}</a></li>
|
||||||
<li {if $_routes[1] eq 'by-period' }class="active" {/if}><a
|
|
||||||
href="{$_url}reports/by-period">{Lang::T('Period Reports')}</a></li>
|
|
||||||
<li {if $_routes[1] eq 'activation' }class="active" {/if}><a
|
<li {if $_routes[1] eq 'activation' }class="active" {/if}><a
|
||||||
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
||||||
{$_MENU_REPORTS}
|
{$_MENU_REPORTS}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user