dont show balance when edit active user
This commit is contained in:
parent
1ed55103a3
commit
d3893d88a4
@ -326,7 +326,7 @@ class Package
|
||||
global $_c;
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $c['id'])->find_one();
|
||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $c['id'])->where('routers', $p['routers'])->find_one();
|
||||
$mikrotik = Mikrotik::info($p['routers']);
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
|
@ -171,7 +171,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||
if ($d) {
|
||||
$ui->assign('d', $d);
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
|
||||
$ui->assign('p', $p);
|
||||
run_hook('view_edit_customer_plan'); #HOOK
|
||||
$ui->display('prepaid-edit.tpl');
|
||||
|
@ -23,7 +23,7 @@
|
||||
<select id="id_plan" name="id_plan" class="form-control select2">
|
||||
{foreach $p as $ps}
|
||||
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>
|
||||
{$ps['name_plan']}</option>
|
||||
{if $ps['is_radius']=='1'}Radius{else}{$ps['routers']}{/if} - {$ps['name_plan']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user