%
% my $string = $cgi->param('arg');
% my @cust_main = smart_search( 'search' => $string,
-% 'no_fuzzy_on_exact' => 1, #pref?
+% 'no_fuzzy_on_exact' => ! $FS::CurrentUser::CurrentUser->option('enable_fuzzy_on_exact'),
% );
% my $return = [ map [ $_->custnum,
% $_->name,
#XXX autogen
my @paramlist = qw( locale menu_position default_customer_view
spreadsheet_format mobile_menu
+ enable_fuzzy_on_exact
disable_html_editor disable_enter_submit_onetimecharge
email_address
snom-ip snom-username snom-password
</SELECT>
</TD>
</TR>
-
+
+ <TR>
+ <TH ALIGN="right" COLSPAN=1>Enable approximate customer searching even when an exact match is found: </TH>
+ <TD ALIGN="left" COLSPAN=2>
+ <INPUT TYPE="checkbox" NAME="enable_fuzzy_on_exact" VALUE="1" <% $curuser->option('enable_fuzzy_on_exact') ? 'CHECKED' : '' %>>
+ </TD>
+ </TR>
+
<TR>
<TH ALIGN="right" COLSPAN=1>Disable HTML editor for customer notes: </TH>
<TD ALIGN="left" COLSPAN=2>
if ( $cgi->param('search_cust') ) {
$sortby = \*company_sort;
$orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )";
- push @cust_main, smart_search( 'search' => scalar($cgi->param('search_cust')),
- 'no_fuzzy_on_exact' => 1, #pref?
- );
+ push @cust_main, smart_search(
+ 'search' => scalar($cgi->param('search_cust')),
+ 'no_fuzzy_on_exact' => ! $curuser->option('enable_fuzzy_on_exact'),
+ );
}
@cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main
if ( $CustomerString ) {
@Customers = &RT::URI::freeside::smart_search(
'search' => $CustomerString,
- 'no_fuzzy_on_exact' => 1, #pref?
+ 'no_fuzzy_on_exact' => ! $FS::CurrentUser::CurrentUser->option('enable_fuzzy_on_exact'),
);
}
if ( $CustomerString ) {
@Customers = &RT::URI::freeside::smart_search(
'search' => $CustomerString,
- 'no_fuzzy_on_exact' => 1, #pref?
+ 'no_fuzzy_on_exact' => ! $FS::CurrentUser::CurrentUser->option('enable_fuzzy_on_exact'),
);
}