don't redirect to a GET with sensitive data, RT#26099
[freeside.git] / httemplate / search / report_tax.cgi
index bfbc5fe..120768d 100755 (executable)
@@ -275,7 +275,7 @@ sub gotcust {
   my $table = shift;
   my $prefix = @_ ? shift : '';
   "
-        ( $table.${prefix}district = cust_main_county.district
+        ( $table.district = cust_main_county.district
           OR cust_main_county.district = ''
           OR cust_main_county.district IS NULL )
     AND ( $table.${prefix}city  = cust_main_county.city
@@ -752,7 +752,12 @@ sub getlabel {
     $label = $r->country;
     $label = $r->state.", $label" if $r->state;
     $label = $r->county." county, $label" if $r->county;
-    $label = $r->city. ", $label" if $r->city && $cgi->param('show_cities');
+    if ( $cgi->param('show_cities') and $r->city ) {
+      $label = $r->city . ", $label";
+      if ( $cgi->param('show_districts') and $r->district ) {
+        $label = '#' . $r->district . ", $label";
+      }
+    }
     $label = "$label (". $r->taxclass. ")"
       if $r->taxclass
       && $cgi->param('show_taxclasses')