add preference to enable fuzzy searching even on exact matches, RT#18962
[freeside.git] / httemplate / search / cust_main.cgi
index a81958e..7c3ad33 100755 (executable)
@@ -468,9 +468,10 @@ if ( $cgi->param('browse')
   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