Fix Voucher Searching

This commit is contained in:
Ibnu Maksum 2023-04-06 09:47:26 +07:00
parent 9f09909616
commit 0c3386f0d1
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
3 changed files with 4 additions and 3 deletions

View file

@ -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": [

View file

@ -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');

View file

@ -13,7 +13,7 @@
<span class="fa fa-search"></span>
</div>
<input type="text" name="code" class="form-control"
placeholder="{$_L['Search_by_Code']}...">
placeholder="{$_L['Search_by_Code']}..." value="{$_code}">
<div class="input-group-btn">
<button class="btn btn-success">{$_L['Search']}</button>
</div>