diff --git a/system/autoload/User.php b/system/autoload/User.php index e8e6e65f..9cf47823 100644 --- a/system/autoload/User.php +++ b/system/autoload/User.php @@ -210,14 +210,15 @@ class User ->select('tbl_user_recharges.id', 'id') ->selects([ 'customer_id', 'username', 'plan_id', 'namebp', 'recharged_on', 'recharged_time', 'expiration', 'time', - 'status', 'method', 'plan_type', 'name_bw', + 'status', 'method', 'plan_type', ['tbl_user_recharges.routers', 'routers'], ['tbl_user_recharges.type', 'type'], 'admin_id', 'prepaid' ]) + ->left_outer_join('tbl_plans', ['tbl_plans.id', '=', 'tbl_user_recharges.plan_id']) + ->left_outer_join('tbl_bandwidth', ['tbl_bandwidth.id', '=', 'tbl_plans.id_bw']) + ->select('tbl_bandwidth.*') ->where('customer_id', $id) - ->left_outer_join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id')) - ->left_outer_join('tbl_bandwidth', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw')) ->find_many(); return $d; } diff --git a/ui/ui/reports.tpl b/ui/ui/reports.tpl index 331a44cd..eee6e0fb 100644 --- a/ui/ui/reports.tpl +++ b/ui/ui/reports.tpl @@ -80,8 +80,9 @@ -
{Lang::T('All Transactions at Date')}: {Lang::dateAndTimeFormat($sd, $ts)} - {Lang::dateAndTimeFormat($ed, $te)}
diff --git a/ui/ui/user-ui/dashboard.tpl b/ui/ui/user-ui/dashboard.tpl index 82d5e9f1..ef959a9b 100644 --- a/ui/ui/user-ui/dashboard.tpl +++ b/ui/ui/user-ui/dashboard.tpl @@ -4,11 +4,13 @@{Lang::T('expired')} | @@ -28,25 +30,26 @@
{Lang::T('Username')} | -{$_user['username']} | -||||||||
{Lang::T('Password')} | -- | ||||||||
{Lang::T('Service Type')} | -
- {if $_user.service_type == 'Hotspot'}
+
+
|
{str_replace(' Bill', '', $k)} | -- {if strpos($v, ':') === false} - {Lang::moneyFormat($v)} - ∞ - {assign var="total" value=$v+$total} - {else} - {assign var="exp" value=explode(':',$v)} - {Lang::moneyFormat($exp[0])} - {if $exp[1]==0}{Lang::T('paid off')}{else}{$exp[1]}x{/if} - {if $exp[1]>0} - {assign var="total" value=$exp[0]+$total} - {/if} - {/if} - | -
{str_replace(' Bill', '', $k)} | ++ {if strpos($v, ':') === false} + {Lang::moneyFormat($v)} + ∞ + {assign var="total" value=$v+$total} + {else} + {assign var="exp" value=explode(':',$v)} + {Lang::moneyFormat($exp[0])} + {if $exp[1]==0}{Lang::T('paid + off')}{else}{$exp[1]}x{/if} + {if $exp[1]>0} + {assign var="total" value=$exp[0]+$total} + {/if} + {/if} + | +
{Lang::T('Total')} | {if $total==0} - {ucwords(Lang::T('paid off'))} + {ucwords(Lang::T('paid off'))} {else} - {Lang::moneyFormat($total)} + {Lang::moneyFormat($total)} {/if} |
{Lang::T('Plan Name')} | -- {$_bill['namebp']} - {if $_bill['status'] != 'on'} - {Lang::T('expired')} - {/if} - | -
{Lang::T('Bandwidth')} | -- {$_bill['name_bw']} - | -
{Lang::T('Created On')} | -- {if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])} - {/if} | -
{Lang::T('Expires On')} | -- {if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if} - | -
{Lang::T('Type')} | -- {if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if} - {$_bill['plan_type']} - | -
{Lang::T('Current IP')} | -{$nux_ip} | -
{Lang::T('Current MAC')} | -{$nux_mac} | -
{Lang::T('Login Status')} | -
- ![]() |
-
{Lang::T('Login Status')} | -- {if $logged == '1'} - {Lang::T('You are Online, Check Status')} - {else} - {Lang::T('Not Online, Login now?')} - {/if} - | -
- {if $_bill['status'] == 'on'} - - {/if} - | -- {if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']} - {Lang::T('Extend')} - {/if} - {Lang::T('Recharge')} - {Lang::T('Sync')} - | -
{Lang::T('Plan Name')} | ++ {$_bill['namebp']} + {if $_bill['status'] != 'on'} + {Lang::T('expired')} + {/if} + | +
{Lang::T('Bandwidth')} | ++ {$_bill['name_bw']} + | +
{Lang::T('Created On')} | ++ {if $_bill['time'] ne + ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])} + {/if} | +
{Lang::T('Expires On')} | ++ {if $_bill['time'] ne + ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if} + | +
{Lang::T('Type')} | ++ {if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if} + {$_bill['plan_type']} + | +
{Lang::T('Current IP')} | +{$nux_ip} | +
{Lang::T('Current MAC')} | +{$nux_mac} | +
{Lang::T('Login Status')} | +
+ ![]() |
+
{Lang::T('Login Status')} | ++ {if $logged == '1'} + {Lang::T('You + are + Online, Check Status')} + {else} + {Lang::T('Not Online, Login now?')} + {/if} + | +
+ {if $_bill['status'] == 'on'} + + {/if} + | ++ {if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']} + {Lang::T('Extend')} + {/if} + {Lang::T('Recharge')} + {Lang::T('Sync')} + | +