# 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";
'table' => 'prospect_main',
'html_table_class'=> 'fsinnerbox',
'labels' => { 'prospectnum' => 'Prospect',
+ 'disabled' => 'Disabled',
'agentnum' => 'Agent',
'refnum' => 'Advertising source',
'company' => 'Company',
'options' => [ 'Residential', 'Commercial', ],
'onchange' => 'rescom_changed',
},
+ { 'field' => 'disabled',
+ 'type' => 'checkbox',
+ 'value' => 'Y',
+ },
{ 'field' => 'agentnum',
'type' => 'select-agent',
'empty_label' => 'Select agent',