Removed unused scope

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-04-26 19:23:27 +01:00
parent 860764a436
commit 50d8b02f8b

View file

@ -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 * 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 before now * and settings.audit_warning_days. It checks to see if assets.expected_checkin is now
* *
* @author A. Gianotto <snipe@snipe.net> * @author A. Gianotto <snipe@snipe.net>
* @since v6.4.0 * @since v6.4.0
* @return \Illuminate\Database\Query\Builder Modified query builder * @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) public function scopeDueForCheckin($query, $settings)
{ {
$interval = $settings->audit_warning_days ?? 0; $interval = $settings->audit_warning_days ?? 0;