diff options
author | Mark Wells <mark@freeside.biz> | 2013-11-08 16:47:27 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-11-08 16:47:27 -0800 |
commit | 37ac9c4f5754a1398b7bc354db716be828f04253 (patch) | |
tree | 5f2c0c3ce9e549e35a070f3d82e5f0820d307a34 /FS/FS/cust_main/Search.pm | |
parent | 475fb78f0bbb9e2e37c04645eaf4b8bf8027ea08 (diff) |
option to make ship_company field available again, #25782
Diffstat (limited to 'FS/FS/cust_main/Search.pm')
-rw-r--r-- | FS/FS/cust_main/Search.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 16db712..215fdc2 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -21,6 +21,7 @@ $me = '[FS::cust_main::Search]'; @fuzzyfields = ( 'cust_main.first', 'cust_main.last', 'cust_main.company', + 'cust_main.ship_company', # if you're using it 'cust_location.address1', 'contact.first', 'contact.last', ); @@ -321,6 +322,7 @@ sub smart_search { $sql .= " ( LOWER(cust_main.first) = $q_value OR LOWER(cust_main.last) = $q_value OR LOWER(cust_main.company) = $q_value + OR LOWER(cust_main.ship_company) = $q_value "; #address1 (yes, it's a kludge) @@ -358,6 +360,7 @@ sub smart_search { my @hashrefs = ( { 'company' => { op=>'ILIKE', value=>"%$value%" }, }, + { 'ship_company' => { op=>'ILIKE', value=>"%$value%" }, }, ); if ( $first && $last ) { @@ -439,7 +442,7 @@ sub smart_search { %fuzopts ); } - foreach my $field ( 'first', 'last', 'company' ) { + foreach my $field ( 'first', 'last', 'company', 'ship_company' ) { push @cust_main, FS::cust_main::Search->fuzzy_search( { $field => $value }, %fuzopts @@ -1193,6 +1196,7 @@ sub append_fuzzyfiles { #foreach my $fuzzy (@fuzzyfields) { foreach my $fuzzy ( 'cust_main.first', 'cust_main.last', 'cust_main.company', 'cust_location.address1', + 'cust_main.ship_company', ) { append_fuzzyfiles_fuzzyfield($fuzzy, shift); |