[freeside-commits] branch FREESIDE_3_BRANCH updated. 50faa8e28abb61ba518b055e6852b0a2185237aa
Christopher Burger
burgerc at freeside.biz
Thu Jan 3 10:00:33 PST 2019
The branch, FREESIDE_3_BRANCH has been updated
via 50faa8e28abb61ba518b055e6852b0a2185237aa (commit)
from 9030875d1d7e8078292d50652a87dca6306eca85 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 50faa8e28abb61ba518b055e6852b0a2185237aa
Author: Christopher Burger <burgerc at freeside.biz>
Date: Thu Jan 3 12:38:32 2019 -0500
RT 81913 - fixed error with batch email from advanced customer reports and contacts report
Conflicts:
httemplate/search/contact.html
httemplate/search/cust_main.html
diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html
index 1c22f8ffd..577e5df8b 100644
--- a/httemplate/misc/email-customers.html
+++ b/httemplate/misc/email-customers.html
@@ -168,7 +168,7 @@ Template:
},
&>
</div>
-% if ($send_to_domain) {
+% if ($send_to_domain && $cgi->param('custnum')) {
<div>
<INPUT TYPE="checkbox" NAME="emailtovoice" ID="emailtovoice" VALUE="ON" onclick="toggleDiv(this)">Email to voice
</div>
@@ -295,6 +295,15 @@ else {
@search{keys %search} = map { /\0/ ? [ split /\0/, $_ ] : $_ } values %search;
}
+# rebuild contacts hash
+delete $search{contacts}
+ if exists $search{contacts} && ref $search{contacts};
+$search{'contacts'} = {
+ map { $_ => $search{$_}, }
+ grep { /^(contacts_*)/ && $search{$_} }
+ keys %search
+};
+
&{$opt{'post_search_hook'}}(
'conf' => $conf,
'search' => \%search,
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index d4b4fafc1..7cfe5ec9b 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -133,8 +133,16 @@ 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;
+ foreach (keys %{$query_hash{contacts}}) { $query_hash{$_} = $query_hash{contacts}{$_}; }
+
+ 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') =>
-----------------------------------------------------------------------
Summary of changes:
httemplate/misc/email-customers.html | 11 ++++++++++-
httemplate/search/cust_main.html | 10 +++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list