From 0c3386f0d11c66dd9da0cc54dbad6dd922bb3dbe Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 6 Apr 2023 09:47:26 +0700 Subject: [PATCH 1/3] Fix Voucher Searching --- composer.json | 2 +- system/controllers/prepaid.php | 3 ++- ui/ui/voucher.tpl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 6efbb598..aae53459 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "hotspotbilling/phpnuxbill", "type": "template", "description": "PHPNuxBill a Hotspot Billing Software.", - "keywords": ["template"], + "keywords": ["template","PHPMixBill","PHPnuxBill","Mikrotik","Hotspot","Billing"], "homepage": "https://github.com/hotspotbilling/phpnuxbill", "license": "MIT", "authors": [ diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index 4aa267a1..3368f75b 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -367,7 +367,7 @@ switch ($action) { $paginator = Paginator::bootstrap('tbl_voucher', 'code', '%' . $code . '%'); $d = ORM::for_table('tbl_plans')->where('enabled', '1') ->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan')) - ->where_like('tbl_plans.code', '%' . $code . '%') + ->where_like('tbl_voucher.code', '%' . $code . '%') ->offset($paginator['startpoint']) ->limit($paginator['limit']) ->find_many(); @@ -380,6 +380,7 @@ switch ($action) { } $ui->assign('d', $d); + $ui->assign('_code', $code); $ui->assign('paginator', $paginator); run_hook('view_list_voucher'); #HOOK $ui->display('voucher.tpl'); diff --git a/ui/ui/voucher.tpl b/ui/ui/voucher.tpl index a8678450..c1b91684 100644 --- a/ui/ui/voucher.tpl +++ b/ui/ui/voucher.tpl @@ -13,7 +13,7 @@ + placeholder="{$_L['Search_by_Code']}..." value="{$_code}">
From 5f07adf0ac70f20c6abdd3c0945cd4bf94a8c4f2 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 6 Apr 2023 09:50:03 +0700 Subject: [PATCH 2/3] fix search --- system/controllers/prepaid.php | 1 + ui/ui/prepaid.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index 3368f75b..6d9e39c0 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -36,6 +36,7 @@ switch ($action) { } $ui->assign('d', $d); + $ui->assign('cari', $username); $ui->assign('paginator', $paginator); run_hook('view_list_billing'); #HOOK $ui->display('prepaid.tpl'); diff --git a/ui/ui/prepaid.tpl b/ui/ui/prepaid.tpl index bbab67af..65248ff9 100644 --- a/ui/ui/prepaid.tpl +++ b/ui/ui/prepaid.tpl @@ -12,7 +12,7 @@
- +
From 33cf1413db064d17318f1553830be0cce1be05c9 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 6 Apr 2023 09:56:17 +0700 Subject: [PATCH 3/3] bring back delete --- ui/ui/hotspot.tpl | 3 ++- ui/ui/pool.tpl | 2 +- ui/ui/pppoe.tpl | 3 ++- ui/ui/prepaid.tpl | 2 +- ui/ui/routers.tpl | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/ui/hotspot.tpl b/ui/ui/hotspot.tpl index bdb8bbd7..1c466ce1 100644 --- a/ui/ui/hotspot.tpl +++ b/ui/ui/hotspot.tpl @@ -50,7 +50,8 @@ {$ds['validity']} {$ds['validity_unit']} {$ds['routers']} - {$_L['Edit']} + {$_L['Edit']} + {$_L['Delete']} {/foreach} diff --git a/ui/ui/pool.tpl b/ui/ui/pool.tpl index f631a944..0a83e141 100644 --- a/ui/ui/pool.tpl +++ b/ui/ui/pool.tpl @@ -46,7 +46,7 @@ {$ds['routers']} {$_L['Edit']} + class="btn btn-info btn-xs">{$_L['Edit']} {$_L['Delete']} diff --git a/ui/ui/pppoe.tpl b/ui/ui/pppoe.tpl index 4e59bd84..f71be73e 100644 --- a/ui/ui/pppoe.tpl +++ b/ui/ui/pppoe.tpl @@ -46,7 +46,8 @@ {$ds['pool']} {$ds['routers']} - {$_L['Edit']} + {$_L['Edit']} + {$_L['Delete']} {/foreach} diff --git a/ui/ui/prepaid.tpl b/ui/ui/prepaid.tpl index 65248ff9..dce05ac5 100644 --- a/ui/ui/prepaid.tpl +++ b/ui/ui/prepaid.tpl @@ -49,7 +49,7 @@ {$ds['routers']} {$_L['Edit']} - {* {$_L['Delete']} *} + {$_L['Delete']} {/foreach} diff --git a/ui/ui/routers.tpl b/ui/ui/routers.tpl index 2f4afedc..13345c74 100644 --- a/ui/ui/routers.tpl +++ b/ui/ui/routers.tpl @@ -49,7 +49,8 @@ {if $ds['enabled'] == 1}Enabled{else}Disabled{/if} {$_L['Edit']} + class="btn btn-info btn-xs">{$_L['Edit']} + {$_L['Delete']} {/foreach}