Remove all used voucher codes

This commit is contained in:
Ibnu Maksum 2023-12-19 11:45:18 +07:00
parent 13b448da69
commit 3afb7b9954
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
4 changed files with 20 additions and 2 deletions

View File

@ -2,6 +2,12 @@
# CHANGELOG # CHANGELOG
## 2023.12.19
- Fix Search Customer
- Disable Registration, Customer just activate voucher Code, and the voucher will be their password
- Remove all used voucher codes
## 2023.12.18 ## 2023.12.18
- Split sms to 160 characters only for Mikrotik Modem - Split sms to 160 characters only for Mikrotik Modem

View File

@ -285,6 +285,12 @@ switch ($action) {
$ui->display('voucher-add.tpl'); $ui->display('voucher-add.tpl');
break; break;
case 'remove-voucher':
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')->findMany();
if ($d) {
$d->delete();
r2(U . 'prepaid/voucher', 's', $_L['Delete_Successfully']);
}
case 'print-voucher': case 'print-voucher':
$from_id = _post('from_id'); $from_id = _post('from_id');
$planid = _post('planid'); $planid = _post('planid');

View File

@ -3,7 +3,13 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="panel panel-hovered mb20 panel-primary"> <div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">{$_L['Prepaid_Vouchers']}</div> <div class="panel-heading">
<div class="btn-group pull-right">
<a class="btn btn-danger btn-xs" title="Remove used Voucher" href="{$_url}prepaid/remove-voucher" onclick="return confirm('Delete all used voucher code?')"><span
class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete All</a>
</div>
{$_L['Prepaid_Vouchers']}
</div>
<div class="panel-body"> <div class="panel-body">
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px"> <div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
<div class="col-md-8"> <div class="col-md-8">

View File

@ -1,3 +1,3 @@
{ {
"version": "2023.12.18" "version": "2023.12.19"
} }