Merge pull request #13764 from Godmartinz/expiring-alerts-fix

Fixed the `getExpiringLicenses` query
This commit is contained in:
snipe 2023-11-13 20:39:29 +00:00 committed by GitHub
commit 13601031cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -668,7 +668,7 @@ class License extends Depreciable
return self::whereNotNull('expiration_date')
->whereNull('deleted_at')
->whereRaw(DB::raw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) '))
->whereRaw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) ')
->where('expiration_date', '>', date('Y-m-d'))
->orderBy('expiration_date', 'ASC')
->get();