diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:30:15 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:30:15 -0800 |
commit | ceeaad3d99869f159bf2fee490aafa4c95d03365 (patch) | |
tree | e5026eeb4204e34fe0b49fe57e0d9412a594b397 /FS/FS/cust_main | |
parent | 7a577311abdb174c4a5b52bd5f0d751931097efd (diff) |
add city search, RT#31659
Diffstat (limited to 'FS/FS/cust_main')
-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 461633a72..f0a7d4137 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -728,6 +728,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/ ) { |