From a05795420a0ca007ef79b3c514c35cdd8c0bb0fb Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 18 Jan 2022 14:34:14 -0600 Subject: [PATCH] Respect the default value of 60 days in expiring licenses --- app/Models/License.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/License.php b/app/Models/License.php index 9bd7627f94..37a0e8d411 100755 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -627,8 +627,8 @@ class License extends Depreciable */ public static function getExpiringLicenses($days = 60) { - $days = (is_null($days)) ? 30 : $days; - + $days = (is_null($days)) ? 60 : $days; + return License::whereNotNull('expiration_date') ->whereNull('deleted_at') ->whereRaw(DB::raw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) '))