Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe
2025-07-07 22:09:45 +01:00
2 changed files with 16 additions and 1 deletions
@@ -34,7 +34,7 @@ class LicenseSeatsController extends Controller
}
if ($request->input('status') == 'assigned') {
$seats->whereNotNull('license_seats.assigned_to')->whereNotNull('license_seats.asset_id');
$seats->ByAssigned();
}
+15
View File
@@ -130,4 +130,19 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
->whereNotNull('license_seats.assigned_to')
->orderBy('license_user_dept.name', $order);
}
public function scopeByAssigned($query)
{
return $query->where(function ($query) {
$query->whereNotNull('assigned_to')
->orWhere(function($query)
{
$query->whereNotNull('asset_id');
});
});
}
}