mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-31 16:37:27 -08:00
Merge pull request #13764 from Godmartinz/expiring-alerts-fix
Fixed the `getExpiringLicenses` query
This commit is contained in:
commit
13601031cb
|
@ -668,7 +668,7 @@ class License extends Depreciable
|
||||||
|
|
||||||
return self::whereNotNull('expiration_date')
|
return self::whereNotNull('expiration_date')
|
||||||
->whereNull('deleted_at')
|
->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'))
|
->where('expiration_date', '>', date('Y-m-d'))
|
||||||
->orderBy('expiration_date', 'ASC')
|
->orderBy('expiration_date', 'ASC')
|
||||||
->get();
|
->get();
|
||||||
|
|
Loading…
Reference in a new issue