Remove all used voucher codes

This commit is contained in:
Ibnu Maksum
2023-12-19 11:45:18 +07:00
parent 13b448da69
commit 3afb7b9954
4 changed files with 20 additions and 2 deletions

View File

@ -285,6 +285,12 @@ switch ($action) {
$ui->display('voucher-add.tpl');
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':
$from_id = _post('from_id');
$planid = _post('planid');