diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:30:16 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:30:16 -0800 |
commit | 0f12bb525e362f0eb97085079c3046c4bf2f6e64 (patch) | |
tree | 2a30bf68194bea3b1d6fb4c501ceb0da02a8b6f1 /FS/FS/cust_main/Search.pm | |
parent | a06c3c79e589012363e0cc07abe737ae01b9b5d2 (diff) |
add city search, RT#31659
Diffstat (limited to 'FS/FS/cust_main/Search.pm')
-rw-r--r-- | FS/FS/cust_main/Search.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index e0dfc3c2f..a8f9791ef 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -727,6 +727,18 @@ sub search { } ## + # city + ## + if ( $params->{'city'} =~ /\S/ ) { + my $city = dbh->quote($params->{'city'}); + push @where, "EXISTS( + SELECT 1 FROM cust_location + WHERE cust_location.custnum = cust_main.custnum + AND cust_location.city = $city + )"; + } + + ## # county ## if ( $params->{'county'} =~ /\S/ ) { |