diff options
author | ivan <ivan> | 2004-08-24 11:16:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-08-24 11:16:57 +0000 |
commit | 0cbeb01df08457b056a7ae775b4924c266b4228b (patch) | |
tree | 24fb4d674874657d05512a48789715eb77c8c7c8 /httemplate | |
parent | e64990633f433dc4e27f0509a2417aea29e0fdc8 (diff) |
big update for reseller interface
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/cust_main.cgi | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 632d68df9..27f23de36 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -498,28 +498,12 @@ sub lastsearch { } if ( $last_type{'Fuzzy'} || $last_type{'All'} ) { - - &FS::cust_main::check_and_rebuild_fuzzyfiles; - my $all_last = &FS::cust_main::all_last; - - my %last; - if ( $last_type{'Fuzzy'} || $last_type{'All'} ) { - foreach ( amatch($last, [ qw(i) ], @$all_last) ) { - $last{$_}++; - } - } - - #if ($last_type{'Sound-alike'}) { - #} - - foreach ( keys %last ) { - push @cust_main, qsearch('cust_main',{'last'=>$_}); - push @cust_main, qsearch('cust_main',{'ship_last'=>$_}) - if defined dbdef->table('cust_main')->column('ship_last'); - } - + push @cust_main, FS::cust_main->fuzzy_search( { 'last' => $last } ); } + #if ($last_type{'Sound-alike'}) { + #} + \@cust_main; } @@ -561,26 +545,10 @@ sub companysearch { } if ( $company_type{'Fuzzy'} || $company_type{'All'} ) { + push @cust_main, FS::cust_main->fuzzy_search( { 'company' => $company } ); + } - &FS::cust_main::check_and_rebuild_fuzzyfiles; - my $all_company = &FS::cust_main::all_company; - - my %company; - if ( $company_type{'Fuzzy'} || $company_type{'All'} ) { - foreach ( amatch($company, [ qw(i) ], @$all_company ) ) { - $company{$_}++; - } - } - - #if ($company_type{'Sound-alike'}) { - #} - - foreach ( keys %company ) { - push @cust_main, qsearch('cust_main',{'company'=>$_}); - push @cust_main, qsearch('cust_main',{'ship_company'=>$_}) - if defined dbdef->table('cust_main')->column('ship_last'); - } - + if ($company_type{'Sound-alike'}) { } \@cust_main; |