X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fcust_main%2FSearch.pm;h=a8f9791ef8842b58c3b1923f265a574b11eea090;hb=250ecb161140a253c305cb7c2b55e4f821befbdc;hp=02f3b642f59f96831cd263aafd533e632b8c08ac;hpb=40f25b8932a3e9830b688ee528ede1dad213c858;p=freeside.git diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 02f3b642f..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/ ) { @@ -831,6 +843,18 @@ sub search { if $params->{'no_POST'}; ## + # "tax exempt" checkbox + ## + push @where, "cust_main.tax = 'Y'" + if $params->{'tax'}; + + ## + # "not tax exempt" checkbox + ## + push @where, "(cust_main.tax = '' OR cust_main.tax IS NULL )" + if $params->{'no_tax'}; + + ## # dates ##