From 2bb7bb059897fd50bcc34586cfd1a9a4d257eb91 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 21 Oct 2010 01:34:52 +0000 Subject: better address searching: disable fuzzy/substring searches when an exact match is found, work around L:EN:NameParse DrainBramage w/two-letter first names like "Ed", add an address1 search to advanced customer search, RT#10254 --- httemplate/search/cust_main.cgi | 4 +++- httemplate/search/cust_main.html | 6 ++++-- httemplate/search/report_cust_main.html | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 93f960f5c..a92c12db5 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -204,7 +204,9 @@ % if ( $cgi->param('search_cust') ) { % $sortby = \*company_sort; % $orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )"; -% push @cust_main, smart_search( 'search' => $cgi->param('search_cust') ); +% push @cust_main, smart_search( 'search' => $cgi->param('search_cust'), +% 'disable_fuzzy_on_exact' => 1, #pref? +% ); % } % % @cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index b6db4e434..57538d8ca 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -44,8 +44,10 @@ my %search_hash = (); #scalars my @scalars = qw ( - agentnum status cancelled_pkgs cust_fields flattened_pkgs custbatch usernum - no_censustract paydate_year paydate_month invoice_terms + agentnum status address paydate_year paydate_month invoice_terms + no_censustract custbatch usernum + cancelled_pkgs + cust_fields flattened_pkgs ); for my $param ( @scalars ) { diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index eb1a66273..5b1b878af 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -28,6 +28,11 @@ ) %> + + Address + + + % foreach my $field (qw( signupdate )) { -- cgit v1.2.1