mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-31 00:04:44 +02:00
Add Yellow line for plan not allowed to purchase
This commit is contained in:
parent
5867a0c9ca
commit
470c219e61
7 changed files with 35 additions and 3 deletions
|
@ -96,6 +96,12 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||
if ($config['enable_balance'] == 'yes') {
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||
if(!$plan['enabled']){
|
||||
r2(U . "home", 'e', 'Plan is not exists');
|
||||
}
|
||||
if($plan['allow_purchase'] != 'yes'){
|
||||
r2(U . "home", 'e', 'Cannot recharge this plan');
|
||||
}
|
||||
if ($user['balance'] > $plan['price']) {
|
||||
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue