summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-10-03 11:16:27 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-10-03 11:16:27 -0400
commit90430c5c67581b41b3c4ad48f70b9e443092977b (patch)
tree5cbee01c2321e4da4f9dfea729ec9ff253c2ea01 /httemplate
parent8f1188e8550992bf3d9078e7a6042420eaf92bd5 (diff)
parent2e5d7c4e1a26af8a8c0f4b5f08f1a683293b9686 (diff)
Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_main.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index 7197bbde7..30162506f 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -13,6 +13,10 @@
\&FS::UI::Web::cust_fields,
@extra_fields,
],
+ 'sort_fields' => [
+ FS::UI::Web::cust_sort_fields(),
+ @extra_sort_fields,
+ ],
'color' => [ FS::UI::Web::cust_colors(),
map '', @extra_fields
],
@@ -68,16 +72,20 @@ for my $param (qw( classnum refnum pkg_classnum )) {
$search_hash{$param} = [ $cgi->param($param) ];
}
+my $params = $cgi->Vars;
+
#contacts
$search_hash{'contacts'} = {
- map { $_ => $cgi->param($_), } grep { /^(contacts_*)/ && $cgi->param($_) } keys $cgi->Vars
+ map { $_ => $cgi->param($_), }
+ grep { /^(contacts_*)/ && $cgi->param($_) }
+ keys %$params
};
#tags
-my $params = $cgi->Vars;
$search_hash{'tagnum'} = [
map { /^tagnum(\d+)/ && $1 }
- grep { /^tagnum(\d+)/ && $cgi->param($_) } keys %$params
+ grep { /^tagnum(\d+)/ && $cgi->param($_) }
+ keys %$params
];
###
@@ -115,9 +123,10 @@ $search_hash{'current_balance'} =
###
my $sql_query = FS::cust_main::Search->search(\%search_hash);
-my $count_query = delete($sql_query->{'count_query'});
-my @extra_headers = @{ delete($sql_query->{'extra_headers'}) };
-my @extra_fields = @{ delete($sql_query->{'extra_fields'}) };
+my $count_query = delete($sql_query->{'count_query'});
+my @extra_headers = @{ delete($sql_query->{'extra_headers'}) };
+my @extra_fields = @{ delete($sql_query->{'extra_fields'}) };
+my @extra_sort_fields = @{ delete($sql_query->{'extra_sort_fields'}) };
my $link = [ "${p}view/cust_main.cgi?", 'custnum' ];