From 50d8b02f8b847e4e5235b2e178dc6f5107016d8c Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 26 Apr 2024 19:23:27 +0100 Subject: [PATCH] Removed unused scope Signed-off-by: snipe --- app/Models/Asset.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 98f3dcc06..b3972b1c8 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -1221,22 +1221,14 @@ class Asset extends Depreciable /** - * Query builder scope for Assets that are OVERDUE for checkin, based on the assets.next_audit_date - * and settings.audit_warning_days. It checks to see if assets.expected_checkin is before now + * Query builder scope for Assets that are DUE for checkin, based on the assets.expected_checkin + * and settings.audit_warning_days. It checks to see if assets.expected_checkin is now * * @author A. Gianotto * @since v6.4.0 * @return \Illuminate\Database\Query\Builder Modified query builder */ - public function scopeDueForCheckinToday($query) - { - return $query->whereNotNull('assets.expected_checkin') - ->where('assets.expected_checkin', '=', Carbon::now()->format('Y-m-d')) - ->where('assets.archived', '=', 0) - ->NotArchived(); - } - public function scopeDueForCheckin($query, $settings) { $interval = $settings->audit_warning_days ?? 0;