From ea743b6db63a97b41d61a379d4161a53e869e7cb Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Tue, 19 Mar 2024 18:21:38 +0700 Subject: [PATCH 1/3] update plan type --- system/updates.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/updates.json b/system/updates.json index 002ad15b..295e71fa 100644 --- a/system/updates.json +++ b/system/updates.json @@ -84,5 +84,8 @@ ], "2024.3.19.1" : [ "ALTER TABLE `tbl_customers` ADD `account_type` ENUM('Business', 'Personal') DEFAULT 'Personal' COMMENT 'For selecting account type' AFTER `coordinates`;" + ], + "2024.3.19.2" : [ + "ALTER TABLE `tbl_plans` ADD `plan_type` ENUM('Business', 'Personal') DEFAULT 'Personal' COMMENT 'For selecting account type' ;" ] } \ No newline at end of file From 6e2e907d85e8b12fc34c3a7166aebe3956854e74 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 19 Mar 2024 19:05:35 +0700 Subject: [PATCH 2/3] move account_type --- system/controllers/order.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/controllers/order.php b/system/controllers/order.php index 9f96fbbd..ca10439b 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -47,8 +47,11 @@ switch ($action) { } $ui->assign('_title', 'Order Plan'); $ui->assign('_system_menu', 'package'); + $account_type = $user['account_type']; + if(empty($account_type)){ + $account_type = 'Personal'; + } if (!empty ($_SESSION['nux-router'])) { - $account_type = $user['account_type']; if ($_SESSION['nux-router'] == 'radius') { $radius_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); $radius_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); From 36eb5ebd3bc7275e5813c1a91e666cd4ec0927a8 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 19 Mar 2024 20:47:31 +0700 Subject: [PATCH 3/3] fix 1 payment gateway --- system/controllers/order.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/controllers/order.php b/system/controllers/order.php index ca10439b..af5c26fa 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -301,7 +301,6 @@ switch ($action) { $_POST['gateway'] = $pgs[0]; } } - break; case 'buy': $gateway = _post('gateway'); if (empty ($gateway) && !empty ($_SESSION['gateway'])) {