classnum of 0 is given, contacts with a null classnum are also included.
Arguments may also contain the dest flag names 'invoice' or 'message'.
-If given, contacts who's invoice_dest and/or invoice_message flags are
+If given, contacts who's invoice_dest and/or message_dest flags are
not set to 'Y' will be excluded.
=cut
This field contains a comma-separated list. This list may contain:
-- the text "invoice" indicating emails should only be sent to contact_email
- addresses with the invoice_dest flag set
-- the text "message" indicating emails should only be sent to contact_email
- addresses with the message_dest flag set
+- the text "invoice" indicating contacts with invoice_dest flag should
+ be included
+- the text "message" indicating contacts with message_dest flag should
+ be included
- numbers representing classnum id values for email contact classes.
If any classnum are present, emails should only be sent to contact_email
addresses where contact_email.classnum contains one of these classes.
Set a string containing a comma-separated list. This list may contain:
-- the text "invoice" indicating emails should only be sent to contact_email
- addresses with the invoice_dest flag set
-- the text "message" indicating emails should only be sent to contact_email
- addresses with the message_dest flag set
- - numbers representing classnum id values for email contact classes.
- If any classnum are present, emails should only be sent to contact_email
- addresses where contact_email.classnum contains one of these classes.
- The classnum 0 also includes where contact_email.classnum IS NULL
+- the text "invoice" indicating contacts with invoice_dest flag should
+ be included
+- the text "message" indicating contacts with message_dest flag should
+ be included
+- numbers representing classnum id values for email contact classes.
+ If any classnum are present, emails should only be sent to contact_email
+ addresses where contact_email.classnum contains one of these classes.
+ The classnum 0 also includes where contact_email.classnum IS NULL
If neither 'invoice' nor 'message' has been specified, this method will
behave as if 'invoice' had been selected
if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) {
+ # URI::query_from does not support hashref
+ # results in: ...&contacts=HASH(0x55e16cb81da8)&...
+ my %query_hash = %search_hash;
+ delete $query_hash{contacts}
+ if exists $query_hash{contacts} && ref $query_hash{contacts};
+
my $uri = new URI;
- $uri->query_form( \%search_hash );
+ $uri->query_form( \%query_hash );
my $query = $uri->query;
push @$menubar, emt('Email a notice to these customers') =>