summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Search.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-05-02 16:21:56 -0700
committerMark Wells <mark@freeside.biz>2013-05-02 16:21:56 -0700
commit6b1b3797e7136fb617c32d467bb3281920318436 (patch)
tree2fef99b95231c35ca760c0b262e159b2c266e9c6 /FS/FS/cust_main/Search.pm
parentcc839bbae9c4615a5d3d2b0c7edcfb0bae58b0ec (diff)
"Without census tract" search should look at the service location, #22741, #940
Diffstat (limited to 'FS/FS/cust_main/Search.pm')
-rw-r--r--FS/FS/cust_main/Search.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index 7dbb7a859..e0c7080fe 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -624,14 +624,14 @@ sub search {
# parse without census tract checkbox
##
- push @where, "(censustract = '' or censustract is null)"
+ push @where, "(ship_location.censustract = '' or ship_location.censustract is null)"
if $params->{'no_censustract'};
##
# parse with hardcoded tax location checkbox
##
- push @where, "geocode is not null"
+ push @where, "ship_location.geocode is not null"
if $params->{'with_geocode'};
##
@@ -841,7 +841,7 @@ sub search {
'ON (cust_main.'.$pre.'locationnum = '.$pre.'location.locationnum) ';
}
- my $count_query = "SELECT COUNT(*) FROM cust_main $extra_sql";
+ my $count_query = "SELECT COUNT(*) FROM cust_main $addl_from $extra_sql";
my @select = (
'cust_main.custnum',
@@ -927,6 +927,8 @@ sub search {
'extra_headers' => \@extra_headers,
'extra_fields' => \@extra_fields,
};
+ warn Data::Dumper::Dumper($sql_query);
+ $sql_query;
}