Check that the asset is not already checked in

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-04-26 19:06:46 +01:00
parent 87de67e4a9
commit 52d6a8990a

View file

@ -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();
}