diff options
author | levinse <levinse> | 2011-01-10 20:14:09 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-01-10 20:14:09 +0000 |
commit | c96415d89487cb60d88aa8601696b84e916db2fb (patch) | |
tree | 6c1ca7582b942a9b8482c0f44aa994831ed91ebb | |
parent | 3aae44e96b429d182a7e36cf0ebb0d4bfef842d9 (diff) |
add customer search by billing email, RT10399
-rw-r--r-- | FS/FS/cust_main/Search.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index ad24ff86e..06a4522f4 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -112,8 +112,17 @@ sub smart_search { # custnum search (also try agent_custid), with some tweaking options if your # legacy cust "numbers" have letters } - - if ( $search =~ /^\s*(\d+)\s*$/ + + + if ( $search =~ /@/ ) { + push @cust_main, + map $_->cust_main, + qsearch( { + 'table' => 'cust_main_invoice', + 'hashref' => { 'dest' => $search }, + } + ); + } elsif ( $search =~ /^\s*(\d+)\s*$/ || ( $conf->config('cust_main-agent_custid-format') eq 'ww?d+' && $search =~ /^\s*(\w\w?\d+)\s*$/ ) |