diff --git a/system/autoload/Package.php b/system/autoload/Package.php index 86c93daf..c4db20fb 100644 --- a/system/autoload/Package.php +++ b/system/autoload/Package.php @@ -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) { diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index 7509c0d8..d8900129 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -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'); diff --git a/ui/ui/prepaid-edit.tpl b/ui/ui/prepaid-edit.tpl index f7d5d92a..21479973 100644 --- a/ui/ui/prepaid-edit.tpl +++ b/ui/ui/prepaid-edit.tpl @@ -23,7 +23,7 @@