summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-01-28 17:54:00 -0600
committerMitch Jackson <mitch@freeside.biz>2018-09-25 22:36:05 -0400
commit3431eb1f893dafd05056eb65276a8e9122f9fd31 (patch)
tree8c18a6e140137077901a5aa46fb49430461734de
parent087d74f7289c302b7b79a97df4ae0f354ef45922 (diff)
RT# 73421 Fix bug on some "Email customers" report links, docs
-rw-r--r--FS/FS/cust_main.pm2
-rw-r--r--FS/FS/cust_main_Mixin.pm8
-rw-r--r--FS/FS/msg_template/email.pm16
-rwxr-xr-xhttemplate/search/cust_main.html8
4 files changed, 20 insertions, 14 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 5ff4ed7..d2c4a36 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 169e1eb..cceaa4b 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 19b9367..12f2b29 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 3016250..0a43a82 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') =>