mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
Check that the asset is not already checked in
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
87de67e4a9
commit
52d6a8990a
|
@ -1246,6 +1246,7 @@ class Asset extends Depreciable
|
|||
return $query->whereNotNull('assets.expected_checkin')
|
||||
->whereBetween('assets.expected_checkin', [$today->format('Y-m-d'), $interval_date])
|
||||
->where('assets.archived', '=', 0)
|
||||
->whereNotNull('assets.assigned_to')
|
||||
->NotArchived();
|
||||
}
|
||||
|
||||
|
@ -1254,6 +1255,7 @@ class Asset extends Depreciable
|
|||
return $query->whereNotNull('assets.expected_checkin')
|
||||
->where('assets.expected_checkin', '<', Carbon::now()->format('Y-m-d'))
|
||||
->where('assets.archived', '=', 0)
|
||||
->whereNotNull('assets.assigned_to')
|
||||
->NotArchived();
|
||||
}
|
||||
|
||||
|
@ -1272,6 +1274,7 @@ class Asset extends Depreciable
|
|||
return $query->whereNotNull('assets.expected_checkin')
|
||||
->where('assets.expected_checkin', '<=', Carbon::now()->format('Y-m-d'))
|
||||
->where('assets.archived', '=', 0)
|
||||
->whereNotNull('assets.assigned_to')
|
||||
->NotArchived();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue