diff options
author | ivan <ivan> | 2010-10-21 01:34:52 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-10-21 01:34:52 +0000 |
commit | 2bb7bb059897fd50bcc34586cfd1a9a4d257eb91 (patch) | |
tree | 334d2cf15a0d532f975032aa3e7e1e6399ec6e1c /httemplate/search | |
parent | 4b7f3cb825c662837c48fd5a24df0b69bfb48e85 (diff) |
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
Diffstat (limited to 'httemplate/search')
-rwxr-xr-x | httemplate/search/cust_main.cgi | 4 | ||||
-rwxr-xr-x | httemplate/search/cust_main.html | 6 | ||||
-rwxr-xr-x | httemplate/search/report_cust_main.html | 5 |
3 files changed, 12 insertions, 3 deletions
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 @@ ) %> + <TR> + <TD ALIGN="right" VALIGN="center">Address</TD> + <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD> + </TR> + % foreach my $field (qw( signupdate )) { <TR> |