From 56345b5743a930e18fcbcbf7140d8199c9731b7e Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 13 Jul 2015 20:59:02 -0700 Subject: [PATCH] Fixes #909 - expired licenses showing in email report --- app/models/License.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/License.php b/app/models/License.php index 8c4cd56f07..44b49ed107 100755 --- a/app/models/License.php +++ b/app/models/License.php @@ -171,6 +171,7 @@ public function freeSeat() return License::whereNotNull('expiration_date') ->whereNull('deleted_at') ->whereRaw(DB::raw( 'DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) ' )) + ->where('expiration_date','<',date("Y-m-d")) ->orderBy('expiration_date', 'ASC') ->get();