1 % if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) {
2 <A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&agent_virt_agentnum=<%$agent_virt_agentnum%>&<%$query%>"><%$label%></A>
6 my $table = $opt{'table'};
7 my $agent_virt_agentnum = $opt{'agent_virt_agentnum'};
8 my $search_hash = $opt{'search_hash'};
9 die "'table' required" if !$table;
10 die "'search_hash' required" if !$search_hash;
13 my @params = map { $_, $search_hash->{$_} } sort keys %$search_hash;
14 $uri->query_form(@params);
15 my $query = $uri->query;
16 my $label = ($opt{'label'} || 'Email a notice to these customers');