From 7f75baeccde8bf68e6914ce7efac73cdb7e7dcd0 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 23 Sep 2010 23:21:06 +0000 Subject: fix use of agent_custid in quick payment entry, RT#10035 --- httemplate/misc/xmlhttp-cust_main-search.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/misc/xmlhttp-cust_main-search.cgi') diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi index 26e68b5d8..615a4bb1e 100644 --- a/httemplate/misc/xmlhttp-cust_main-search.cgi +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -2,10 +2,10 @@ % % my $custnum = $cgi->param('arg'); % my $cust_main = ''; -% if ( $custnum <= 2147483647 ) { +% if ( $custnum =~ /^(\d+)$/ and $1 <= 2147483647 ) { % $cust_main = qsearchs({ % 'table' => 'cust_main', -% 'hashref' => { 'custnum' => $custnum }, +% 'hashref' => { 'custnum' => $1 }, % 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, % }); % } -- cgit v1.2.1 From c22410950cebc97f35091753a6e84d577bc6c5f3 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 22 Oct 2010 18:03:47 +0000 Subject: add no_fuzzy_on_exact to RT customer search and our smart search boxes too, RT#10341 --- httemplate/misc/xmlhttp-cust_main-search.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/xmlhttp-cust_main-search.cgi') diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi index 615a4bb1e..481bea264 100644 --- a/httemplate/misc/xmlhttp-cust_main-search.cgi +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -22,7 +22,9 @@ % } elsif ( $sub eq 'smart_search' ) { % % my $string = $cgi->param('arg'); -% my @cust_main = smart_search( 'search' => $string ); +% my @cust_main = smart_search( 'search' => $string, +% 'no_fuzzy_on_exact' => 1, #pref? +% ); % my $return = [ map [ $_->custnum, $_->name ], @cust_main ]; % <% objToJson($return) %> -- cgit v1.2.1