mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-30 22:59:28 +02:00
delete used Voucher more than 3 months
This commit is contained in:
parent
e3796d38e4
commit
df2e548a2a
3 changed files with 8 additions and 3 deletions
|
@ -480,7 +480,10 @@ switch ($action) {
|
|||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
}
|
||||
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')->findMany();
|
||||
$time3months = strtotime('-3 months');
|
||||
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')
|
||||
->where_raw("UNIX_TIMESTAMP(used_date) < $time3months")
|
||||
->findMany();
|
||||
if ($d) {
|
||||
$jml = 0;
|
||||
foreach ($d as $v) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue