diff options
-rw-r--r-- | FS/FS/cust_main.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_main_Mixin.pm | 8 | ||||
-rw-r--r-- | FS/FS/msg_template/email.pm | 16 | ||||
-rwxr-xr-x | httemplate/search/cust_main.html | 8 |
4 files changed, 20 insertions, 14 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 5ff4ed7c0..d2c4a36ed 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -3276,7 +3276,7 @@ contacts with a matching cust_contact.classnum are returned. When a 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 diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index 169e1eb65..cceaa4bc7 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -399,10 +399,10 @@ Text body 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. diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm index 19b9367d9..12f2b2939 100644 --- a/FS/FS/msg_template/email.pm +++ b/FS/FS/msg_template/email.pm @@ -214,14 +214,14 @@ A L<MIME::Entity> (or arrayref of them) to attach to the message. 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 diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index 30162506f..0a43a82dd 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -140,8 +140,14 @@ my $menubar = []; 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') => |