RT# 75357 - Prospects can now be disabled
[freeside.git] / FS / FS / prospect_main.pm
index a6b593d..7557e77 100644 (file)
@@ -427,7 +427,7 @@ sub search {
   # here is the agent virtualization
   push @where, $FS::CurrentUser::CurrentUser->agentnums_sql;
 
-  my $extra_sql = scalar(@where) ? ' WHERE '. join(' AND ', @where) : '';
+  my $extra_sql = scalar(@where) ? ' WHERE prospect_main.custnum IS NULL AND '. join(' AND ', @where) : '';
 
   my $count_query = "SELECT COUNT(*) FROM prospect_main $extra_sql";