-
-
{Lang::T('Payment Gateway')}
-
-
+
{include file="sections/footer.tpl"}
\ No newline at end of file
diff --git a/ui/ui/user-selectGateway.tpl b/ui/ui/user-selectGateway.tpl
index d74bd75..4a86462 100644
--- a/ui/ui/user-selectGateway.tpl
+++ b/ui/ui/user-selectGateway.tpl
@@ -11,8 +11,8 @@
{foreach $pgs as $pg}
-
- {ucwords($pg)}
+
+ {ucwords($pg)}
{/foreach}
diff --git a/version.json b/version.json
index 7a93c66..13a15d0 100644
--- a/version.json
+++ b/version.json
@@ -1,3 +1,3 @@
{
- "version": "2024.3.6"
+ "version": "2024.3.12"
}
\ No newline at end of file
From b95788262d27ed7c69dcd580689e567ce492d4ca Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 11:48:17 +0700
Subject: [PATCH 13/20] Change button
---
ui/ui/paymentgateway.tpl | 10 +++++-----
ui/ui/user-dashboard.tpl | 29 ++++++++++++++++++-----------
2 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/ui/ui/paymentgateway.tpl b/ui/ui/paymentgateway.tpl
index 5fdf115..1429729 100644
--- a/ui/ui/paymentgateway.tpl
+++ b/ui/ui/paymentgateway.tpl
@@ -10,10 +10,10 @@
{foreach $pgs as $pg}
+ {if in_array($pg, $actives)}checked{/if} value="{$pg}">
{ucwords($pg)}
+ class="btn btn-block btn-{if in_array($pg, $actives)}info{else}default{/if} text-left">{ucwords($pg)}
+
@@ -22,8 +22,8 @@
-
+
diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-dashboard.tpl
index f797acc..732f441 100644
--- a/ui/ui/user-dashboard.tpl
+++ b/ui/ui/user-dashboard.tpl
@@ -53,10 +53,10 @@
{Lang::T('Announcement')}
- {$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"}
- {if file_exists($Announcement_Customer)}
- {include file=$Announcement_Customer}
- {/if}
+ {$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"}
+ {if file_exists($Announcement_Customer)}
+ {include file=$Announcement_Customer}
+ {/if}
@@ -131,11 +131,8 @@
{Lang::T('Plan Name')}
{$_bill['namebp']}
- {if $_bill['status'] == 'on'}
- {Lang::T('Deactivate')}
- {else}
- {Lang::T('expired')}
+ {if $_bill['status'] != 'on'}
+ {Lang::T('expired')}
{/if}
@@ -149,8 +146,6 @@
{Lang::T('Expires On')}
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}
- {Lang::T('Recharge')}
{if $nux_ip}
@@ -173,6 +168,18 @@
{/if}
+
+
+ {if $_bill['status'] == 'on'}
+
+ {/if}
+
+
+ {Lang::T('Recharge')}
+
+
{/foreach}
From b9e987570cb12452c5a4d67824089b80aa597f88 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 11:54:20 +0700
Subject: [PATCH 14/20] Show From Customer
---
system/controllers/order.php | 8 +--
system/lan/english.json | 4 +-
ui/ui/balance-add.tpl | 109 ++++++++++++++++++-----------------
ui/ui/balance-edit.tpl | 2 +-
ui/ui/hotspot-add.tpl | 2 +-
ui/ui/hotspot-edit.tpl | 2 +-
ui/ui/pppoe-add.tpl | 2 +-
ui/ui/pppoe-edit.tpl | 2 +-
8 files changed, 63 insertions(+), 68 deletions(-)
diff --git a/system/controllers/order.php b/system/controllers/order.php
index b45aa8c..03bdfd9 100644
--- a/system/controllers/order.php
+++ b/system/controllers/order.php
@@ -152,9 +152,6 @@ switch ($action) {
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 ($routes['2'] == 'radius') {
$router_name = 'radius';
} else {
@@ -188,9 +185,6 @@ switch ($action) {
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 ($routes['2'] == 'radius') {
$router_name = 'radius';
} else {
@@ -319,7 +313,7 @@ switch ($action) {
$router['id'] = 0;
$router['name'] = 'balance';
}
- $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->where('allow_purchase', 'yes')->find_one($routes['3']);
+ $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']);
if (empty($router) || empty($plan)) {
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
}
diff --git a/system/lan/english.json b/system/lan/english.json
index 071f1b7..7cf1720 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -384,7 +384,6 @@
"After_Customer_activate_voucher_or_login__customer_will_be_redirected_to_this_url": "After Customer activate voucher or login, customer will be redirected to this url",
"Voucher_Prefix": "Voucher Prefix",
"Voucher_activation_success__now_you_can_login": "Voucher activation success, now you can login",
- "Client_Can_Purchase": "Client Can Purchase",
"Buy_this__your_active_package_will_be_overwritten": "Buy this? your active package will be overwritten",
"Pay_this_with_Balance__your_active_package_will_be_overwritten": "Pay this with Balance? your active package will be overwritten",
"Buy_this__your_active_package_will_be_overwrite": "Buy this? your active package will be overwrite",
@@ -468,5 +467,6 @@
"Please_select_Payment_Gateway": "Please select Payment Gateway",
"Payment_Gateway_Deleted": "Payment Gateway Deleted",
"Payment_Gateway_not_set__please_set_it_in_Settings": "Payment Gateway not set, please set it in Settings",
- "Failed_to_create_Transaction__": "Failed to create Transaction.."
+ "Failed_to_create_Transaction__": "Failed to create Transaction..",
+ "Show_To_Customer": "Show To Customer"
}
\ No newline at end of file
diff --git a/ui/ui/balance-add.tpl b/ui/ui/balance-add.tpl
index 79a796a..748ffcb 100644
--- a/ui/ui/balance-add.tpl
+++ b/ui/ui/balance-add.tpl
@@ -1,59 +1,60 @@
{include file="sections/header.tpl"}
-
-
-
-
{Lang::T('Add Service Plan')}
-
+
+
-{include file="sections/footer.tpl"}
+{include file="sections/footer.tpl"}
\ No newline at end of file
diff --git a/ui/ui/balance-edit.tpl b/ui/ui/balance-edit.tpl
index 8d735cd..e188f0e 100644
--- a/ui/ui/balance-edit.tpl
+++ b/ui/ui/balance-edit.tpl
@@ -19,7 +19,7 @@
diff --git a/ui/ui/pppoe-edit.tpl b/ui/ui/pppoe-edit.tpl
index 5d9d044..010ec75 100644
--- a/ui/ui/pppoe-edit.tpl
+++ b/ui/ui/pppoe-edit.tpl
@@ -62,7 +62,7 @@
-
{Lang::T('1 Period = 30 Month, Expires the 20th of each month')}
+
{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}
From 1a4a0f2c1065f48681b4df03b1115cbf8cc7e5c9 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 12:12:36 +0700
Subject: [PATCH 16/20] Invoice number not Random
---
system/autoload/Package.php | 14 +++++++-------
system/controllers/export.php | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/system/autoload/Package.php b/system/autoload/Package.php
index 0e153b5..49ab694 100644
--- a/system/autoload/Package.php
+++ b/system/autoload/Package.php
@@ -44,7 +44,7 @@ class Package
if ($router_name == 'balance') {
// insert table transactions
- $inv = "INV-" . Package::_raid(5);
+ $inv = "INV-" . Package::_raid();
$t = ORM::for_table('tbl_transactions')->create();
$t->invoice = $inv;
$t->username = $c['username'];
@@ -188,7 +188,7 @@ class Package
// insert table transactions
$t = ORM::for_table('tbl_transactions')->create();
- $t->invoice = "INV-" . Package::_raid(5);
+ $t->invoice = "INV-" . Package::_raid();
$t->username = $c['username'];
$t->plan_name = $p['name_plan'];
$t->price = $p['price'];
@@ -260,7 +260,7 @@ class Package
// insert table transactions
$t = ORM::for_table('tbl_transactions')->create();
- $t->invoice = "INV-" . Package::_raid(5);
+ $t->invoice = "INV-" . Package::_raid();
$t->username = $c['username'];
$t->plan_name = $p['name_plan'];
if ($p['validity_unit'] == 'Period') {
@@ -373,7 +373,7 @@ class Package
// insert table transactions
$t = ORM::for_table('tbl_transactions')->create();
- $t->invoice = "INV-" . Package::_raid(5);
+ $t->invoice = "INV-" . Package::_raid();
$t->username = $c['username'];
$t->plan_name = $p['name_plan'];
$t->price = $p['price'];
@@ -444,7 +444,7 @@ class Package
// insert table transactions
$t = ORM::for_table('tbl_transactions')->create();
- $t->invoice = "INV-" . Package::_raid(5);
+ $t->invoice = "INV-" . Package::_raid();
$t->username = $c['username'];
$t->plan_name = $p['name_plan'];
if ($p['validity_unit'] == 'Period') {
@@ -588,9 +588,9 @@ class Package
}
- public static function _raid($l)
+ public static function _raid()
{
- return substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
+ return ORM::for_table('tbl_transactions')->max('id')+1;
}
/**
diff --git a/system/controllers/export.php b/system/controllers/export.php
index 6508fa7..e2da4ff 100644
--- a/system/controllers/export.php
+++ b/system/controllers/export.php
@@ -170,7 +170,7 @@ $style
$html
EOF;
$mpdf->WriteHTML($nhtml);
- $mpdf->Output(date('Y-m-d') . Package::_raid(4) . '.pdf', 'D');
+ $mpdf->Output(date('Ymd_His') . '.pdf', 'D');
} else {
echo 'No Data';
}
@@ -344,7 +344,7 @@ $style
$html
EOF;
$mpdf->WriteHTML($nhtml);
- $mpdf->Output(date('Y-m-d') . Package::_raid(4) . '.pdf', 'D');
+ $mpdf->Output(date('Ymd_His') . '.pdf', 'D');
} else {
echo 'No Data';
}
From 7c5958c8c15d2867b62869cf7eecf591fd8a2bc6 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 13:46:40 +0700
Subject: [PATCH 17/20] delete allow_purchase in cron
---
system/cron.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/system/cron.php b/system/cron.php
index 76783ee..9cc5519 100644
--- a/system/cron.php
+++ b/system/cron.php
@@ -61,7 +61,7 @@ foreach ($d as $ds) {
// autorenewal from deposit
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
- if ($p && $p['enabled'] && $c['balance'] >= $p['price'] && $p['allow_purchase'] == 'yes') {
+ if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
// if success, then get the balance
Balance::min($ds['customer_id'], $p['price']);
@@ -116,7 +116,7 @@ foreach ($d as $ds) {
// autorenewal from deposit
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
- if ($p && $p['enabled'] && $c['balance'] >= $p['price'] && $p['allow_purchase'] == 'yes') {
+ if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
// if success, then get the balance
Balance::min($ds['customer_id'], $p['price']);
From 6d15437333325c4e7c8e8560433256668f3d4af9 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 13:58:42 +0700
Subject: [PATCH 18/20] admin can recharge disabled plan
---
system/autoload/Package.php | 4 ++--
system/controllers/autoload.php | 14 +++++++++++---
system/controllers/prepaid.php | 10 +++++-----
ui/ui/autoload.tpl | 2 +-
ui/ui/prepaid-edit.tpl | 3 ++-
5 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/system/autoload/Package.php b/system/autoload/Package.php
index 49ab694..a33df78 100644
--- a/system/autoload/Package.php
+++ b/system/autoload/Package.php
@@ -30,7 +30,7 @@ class Package
}
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
- $p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
+ $p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one();
if ($p['validity_unit'] == 'Period') {
$f = ORM::for_table('tbl_customers_fields')->where('field_name', 'Expired Date')->where('customer_id', $c['id'])->find_one();
if (!$f) {
@@ -511,7 +511,7 @@ class Package
public static function changeTo($username, $plan_id, $from_id)
{
$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();
+ $p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one();
$b = ORM::for_table('tbl_user_recharges')->find_one($from_id);
if ($p['routers'] == $b['routers'] && $b['routers'] != 'radius') {
$mikrotik = Mikrotik::info($p['routers']);
diff --git a/system/controllers/autoload.php b/system/controllers/autoload.php
index 3a4ce34..546473a 100644
--- a/system/controllers/autoload.php
+++ b/system/controllers/autoload.php
@@ -38,10 +38,18 @@ switch ($action) {
case 'plan':
$server = _post('server');
$jenis = _post('jenis');
- if($server=='radius'){
- $d = ORM::for_table('tbl_plans')->where('is_radius', 1)->where('type', $jenis)->where('enabled', '1')->find_many();
+ if(in_array($admin['user_type'], array('SuperAdmin', 'Admin'))){
+ if($server=='radius'){
+ $d = ORM::for_table('tbl_plans')->where('is_radius', 1)->where('type', $jenis)->find_many();
+ }else{
+ $d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->find_many();
+ }
}else{
- $d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->where('enabled', '1')->find_many();
+ if($server=='radius'){
+ $d = ORM::for_table('tbl_plans')->where('is_radius', 1)->where('type', $jenis)->where('enabled', '1')->find_many();
+ }else{
+ $d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->where('enabled', '1')->find_many();
+ }
}
$ui->assign('d', $d);
diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php
index fb81018..18f99ca 100644
--- a/system/controllers/prepaid.php
+++ b/system/controllers/prepaid.php
@@ -89,10 +89,6 @@ switch ($action) {
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
}
$ui->assign('xfooter', $select2_customer);
- $p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
- $ui->assign('p', $p);
- $r = ORM::for_table('tbl_routers')->where('enabled', '1')->find_many();
- $ui->assign('r', $r);
if (isset($routes['2']) && !empty($routes['2'])) {
$ui->assign('cust', ORM::for_table('tbl_customers')->find_one($routes['2']));
}
@@ -193,7 +189,11 @@ 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')->where_not_equal('type', 'Balance')->find_many();
+ if(in_array($admin['user_type'], array('SuperAdmin', 'Admin'))){
+ $p = ORM::for_table('tbl_plans')->where_not_equal('type', 'Balance')->find_many();
+ }else{
+ $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->assign('_title', 'Edit Plan');
diff --git a/ui/ui/autoload.tpl b/ui/ui/autoload.tpl
index 86f0d74..caeff1a 100644
--- a/ui/ui/autoload.tpl
+++ b/ui/ui/autoload.tpl
@@ -1,4 +1,4 @@
Select Plans
{foreach $d as $ds}
- {$ds['name_plan']} • {Lang::moneyFormat($ds['price'])}
+{if $ds['enabled'] neq 1}DISABLED PLAN • {/if}{$ds['name_plan']} • {Lang::moneyFormat($ds['price'])}
{/foreach}
\ No newline at end of file
diff --git a/ui/ui/prepaid-edit.tpl b/ui/ui/prepaid-edit.tpl
index 0fe23a1..ce98b57 100644
--- a/ui/ui/prepaid-edit.tpl
+++ b/ui/ui/prepaid-edit.tpl
@@ -23,7 +23,8 @@
{foreach $p as $ps}
- {if $ps['is_radius']=='1'}Radius{else}{$ps['routers']}{/if} - {$ps['name_plan']}
+ {if $ps['enabled'] neq 1}DISABLED PLAN • {/if}
+ {if $ps['is_radius']=='1'}Radius{else}{$ps['routers']}{/if} • {$ps['name_plan']}
{/foreach}
From c9058769ce4c3cf6231ed25551db9406632524e3 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 12 Mar 2024 15:09:00 +0700
Subject: [PATCH 19/20] Recharge with balance or zero cost
---
system/autoload/Package.php | 16 ++++++++++++-
system/autoload/User.php | 6 +++--
system/controllers/prepaid.php | 41 ++++++++++++++++++++++++++--------
system/lan/english.json | 5 ++++-
ui/ui/autoload.tpl | 2 +-
ui/ui/recharge.tpl | 15 +++++++++++--
6 files changed, 69 insertions(+), 16 deletions(-)
diff --git a/system/autoload/Package.php b/system/autoload/Package.php
index a33df78..c6c9b90 100644
--- a/system/autoload/Package.php
+++ b/system/autoload/Package.php
@@ -19,7 +19,7 @@ class Package
*/
public static function rechargeUser($id_customer, $router_name, $plan_id, $gateway, $channel)
{
- global $config, $admin, $c, $p, $b, $t, $d;
+ global $config, $admin, $c, $p, $b, $t, $d, $zero;
$date_now = date("Y-m-d H:i:s");
$date_only = date("Y-m-d");
$time_only = date("H:i:s");
@@ -31,6 +31,20 @@ class Package
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one();
+
+ if(isset($zero) && $zero==1){
+ $p['price'] = 0;
+ }
+
+ if(!$p['enabled']){
+ if(!isset($admin) || !isset($admin['id']) || empty($admin['id'])){
+ r2(U . 'home', 'e', Lang::T('Plan Not found'));
+ }
+ if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
+ r2(U . 'dashboard', 'e', Lang::T('Plan Not found'));
+ }
+ }
+
if ($p['validity_unit'] == 'Period') {
$f = ORM::for_table('tbl_customers_fields')->where('field_name', 'Expired Date')->where('customer_id', $c['id'])->find_one();
if (!$f) {
diff --git a/system/autoload/User.php b/system/autoload/User.php
index afda269..645190c 100644
--- a/system/autoload/User.php
+++ b/system/autoload/User.php
@@ -39,9 +39,11 @@ class User
}
}
- public static function _info()
+ public static function _info($id = 0)
{
- $id = User::getID();
+ if(!$id){
+ $id = User::getID();
+ }
$d = ORM::for_table('tbl_customers')->find_one($id);
if(empty($d['username'])){
diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php
index 18f99ca..f31aadd 100644
--- a/system/controllers/prepaid.php
+++ b/system/controllers/prepaid.php
@@ -120,22 +120,45 @@ switch ($action) {
$id_customer = _post('id_customer');
$type = _post('type');
$server = _post('server');
- $plan = _post('plan');
+ $planId = _post('plan');
+ $using = _post('using');
$date_only = date("Y-m-d");
$time = date("H:i:s");
$msg = '';
- if ($id_customer == '' or $type == '' or $server == '' or $plan == '') {
- $msg .= 'All field is required' . ' ';
+ if ($id_customer == '' or $type == '' or $server == '' or $planId == '') {
+ $msg .= Lang::T('All field is required') . ' ';
}
if ($msg == '') {
- if (Package::rechargeUser($id_customer, $server, $plan, "Recharge", $admin['fullname'])) {
- $c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
- $in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
+ $gateway = 'Recharge';
+ $channel = $admin['fullname'];
+ $cust = User::_info($id_customer);
+ if ($using == 'balance' && $config['enable_balance'] == 'yes') {
+ $plan = ORM::for_table('tbl_plans')->find_one($planId);
+ if (!$cust) {
+ r2(U . 'prepaid/recharge', 'e', Lang::T('Customer not found'));
+ }
+ if (!$plan) {
+ r2(U . 'prepaid/recharge', 'e', Lang::T('Plan not found'));
+ }
+ if ($cust['balance'] < $plan['price']) {
+ r2(U . 'prepaid/recharge', 'e', Lang::T('insufficient balance'));
+ }
+ $gateway = 'Recharge Balance';
+ }
+ if ($using == 'zero') {
+ $zero = 1;
+ $gateway = 'Recharge Zero';
+ }
+ if (Package::rechargeUser($id_customer, $server, $planId, $gateway, $channel)) {
+ if ($using == 'balance') {
+ Balance::min($cust['id'], $plan['price']);
+ }
+ $in = ORM::for_table('tbl_transactions')->where('username', $cust['username'])->order_by_desc('id')->find_one();
Package::createInvoice($in);
$ui->display('invoice.tpl');
- _log('[' . $admin['username'] . ']: ' . 'Recharge ' . $c['username'] . ' [' . $in['plan_name'] . '][' . Lang::moneyFormat($in['price']) . ']', $admin['user_type'], $admin['id']);
+ _log('[' . $admin['username'] . ']: ' . 'Recharge ' . $cust['username'] . ' [' . $in['plan_name'] . '][' . Lang::moneyFormat($in['price']) . ']', $admin['user_type'], $admin['id']);
} else {
r2(U . 'prepaid/recharge', 'e', "Failed to recharge account");
}
@@ -189,9 +212,9 @@ switch ($action) {
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
if ($d) {
$ui->assign('d', $d);
- if(in_array($admin['user_type'], array('SuperAdmin', 'Admin'))){
+ if (in_array($admin['user_type'], array('SuperAdmin', 'Admin'))) {
$p = ORM::for_table('tbl_plans')->where_not_equal('type', 'Balance')->find_many();
- }else{
+ } else {
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
}
$ui->assign('p', $p);
diff --git a/system/lan/english.json b/system/lan/english.json
index 7cf1720..4e8d897 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -468,5 +468,8 @@
"Payment_Gateway_Deleted": "Payment Gateway Deleted",
"Payment_Gateway_not_set__please_set_it_in_Settings": "Payment Gateway not set, please set it in Settings",
"Failed_to_create_Transaction__": "Failed to create Transaction..",
- "Show_To_Customer": "Show To Customer"
+ "Show_To_Customer": "Show To Customer",
+ "Using": "Using",
+ "Default": "Default",
+ "Customer_Balance": "Customer Balance"
}
\ No newline at end of file
diff --git a/ui/ui/autoload.tpl b/ui/ui/autoload.tpl
index caeff1a..30ff8b9 100644
--- a/ui/ui/autoload.tpl
+++ b/ui/ui/autoload.tpl
@@ -1,4 +1,4 @@
Select Plans
{foreach $d as $ds}
-{if $ds['enabled'] neq 1}DISABLED PLAN • {/if}{$ds['name_plan']} • {Lang::moneyFormat($ds['price'])}
+{if $ds['enabled'] neq 1}DISABLED PLAN • {/if}{$ds['name_plan']} • {Lang::moneyFormat($ds['price'])}{if $ds['allow_purchase'] neq 'yes'} • HIDDEN PLAN {/if}
{/foreach}
\ No newline at end of file
diff --git a/ui/ui/recharge.tpl b/ui/ui/recharge.tpl
index eba82b0..b07c990 100644
--- a/ui/ui/recharge.tpl
+++ b/ui/ui/recharge.tpl
@@ -27,7 +27,7 @@