diff options
author | jeff <jeff> | 2007-03-20 20:21:59 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-03-20 20:21:59 +0000 |
commit | 0a8b795d787178ea0b603540b3b8d4d04ce297be (patch) | |
tree | 4d14b32461810774bf4b98bfd190a28892005a5e | |
parent | 2d568f3b0ef121dd444c47298e8a2a6a8e7d1648 (diff) |
ticket 1418, a tool for customer note importation (backport)
-rw-r--r-- | FS/FS/cust_main.pm | 8 | ||||
-rw-r--r-- | httemplate/elements/menu.html | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 4066b8f4b..bee695121 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4115,7 +4115,8 @@ sub fuzzy_search { Accepts the following options: I<search>, the string to search for. The string will be searched for as a customer number, phone number, name or company name, as an exact, or, in some cases, a substring or fuzzy match (see the source code -for the exact heuristics used). +for the exact heuristics used); I<no_fuzzy_on_exact>, causes smart_search to +skip fuzzy matching when an exact match is found. Any additional options are treated as an additional qualifier on the search (i.e. I<agentnum>). @@ -4132,6 +4133,7 @@ sub smart_search { my @cust_main = (); + my $skup_fuzzy = delete $options{'no_fuzzy_on_exact'}; my $search = delete $options{'search'}; ( my $alphanum_search = $search ) =~ s/\W//g; @@ -4269,7 +4271,7 @@ sub smart_search { #always do substring & fuzzy, #getting complains searches are not returning enough - #unless ( @cust_main ) { #no exact match, trying substring/fuzzy + unless ( @cust_main && $skip_fuzzy ) { #no exact match, trying substring/fuzzy #still some false laziness w/ search/cust_main.cgi @@ -4330,7 +4332,7 @@ sub smart_search { FS::cust_main->fuzzy_search( { $field => $value }, @fuzopts ); } - #} + } #eliminate duplicates my %saw = (); diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 9565ff2d0..a58f25add 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -187,6 +187,7 @@ $report_menu{'Financial'} = [ \%report_financial, 'Financial reports' ] tie my %tools_importing, 'Tie::IxHash', 'Import customers from CSV file' => [ $fsurl.'misc/cust_main-import.cgi', '' ], + 'Import customer notes from CSV file' => [ $fsurl.'misc/cust_main_note-import.html', '' ], 'Import one-time charges from CSV file' => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ], 'Import Call Detail Records (CDRs) from CSV file' => [ $fsurl.'misc/cdr-import.html', '' ], ; |