CCH taxes with new customer locations, #21485
[freeside.git] / FS / FS / cust_main / Search.pm
index b022985..f14f897 100644 (file)
@@ -668,7 +668,9 @@ sub search {
   # parse with hardcoded tax location checkbox
   ##
 
-  push @where, "ship_location.geocode is not null"
+  my $tax_prefix = FS::Conf->new->exists('tax-ship_location') ? 'ship_' 
+                                                              : 'bill_';
+  push @where, "${tax_prefix}location.geocode is not null"
     if $params->{'with_geocode'};
 
   ##