From ceeaad3d99869f159bf2fee490aafa4c95d03365 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 7 Jan 2015 14:30:15 -0800 Subject: add city search, RT#31659 --- FS/FS/cust_main/Search.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'FS') 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 @@ -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 ## -- cgit v1.2.1