X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.html;h=0d80b6dfe3b007ab4f2ca5e12dc433546cc9e204;hb=f4fc05af8e1ba11e79c70dfa074b143185c4cb02;hp=b97a4ef607aac9603a827c5f01740e5e446dd968;hpb=39bd5b53c899df1f543ef85dac206cdc135e9f3f;p=freeside.git diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index b97a4ef60..0d80b6dfe 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 ], @@ -27,7 +31,11 @@ $cgi->param('cust_fields') ) ), - map '', @extra_fields + map { $_ eq 'num_referrals' + ? $referral_link + : '' + } + @extra_fields ], &> <%init> @@ -41,13 +49,17 @@ my %search_hash = (); #scalars my @scalars = qw ( - agentnum salesnum status address zip paydate_year paydate_month invoice_terms - no_censustract with_geocode with_email POST no_POST + agentnum salesnum status + address city county state zip country location_history + paydate_year paydate_month invoice_terms + no_censustract with_geocode with_email tax no_tax POST no_POST custbatch usernum cancelled_pkgs cust_fields flattened_pkgs all_tags all_pkg_classnums + any_pkg_status + with_referrals referral_status ); for my $param ( @scalars ) { @@ -60,6 +72,11 @@ for my $param (qw( classnum refnum payby tagnum pkg_classnum )) { $search_hash{$param} = [ $cgi->param($param) ]; } +#contacts +$search_hash{'contacts'} = { + map { $_ => $cgi->param($_), } grep { /^(contacts_*)/ && $cgi->param($_) } keys $cgi->Vars +}; + ### # parse dates ### @@ -95,12 +112,15 @@ $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' ]; +my $referral_link = [ "${p}search/cust_main.cgi?referral_custnum=", 'custnum' ]; + ### # email links ###