X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partVI_census.html;h=fc260bef8e7fe352b269d1ed0d10fceb52451f5c;hb=8e24d6492d74693011997843ba2101a9360670b4;hp=d28caeb47566b8c9a67d18d55f309560047e5a05;hpb=c0e1b949ca42baf12bc501be41401608f10853e6;p=freeside.git
diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html
index d28caeb47..fc260bef8 100755
--- a/httemplate/search/477partVI_census.html
+++ b/httemplate/search/477partVI_census.html
@@ -1,13 +1,6 @@
<% include( 'elements/search.html',
'html_init' => $html_init,
- 'html_foot' => sub { if (scalar(keys %state_hash) > 1) {
- '
'.
- 'WARNING: multiple states found'.
- '
';
- } else {
- '';
- }
- },
+ 'html_foot' => $html_foot,,
'name' => 'regions',
'query' => [ @sql_query ],
'count_query' => $count_query,
@@ -37,14 +30,16 @@
],
'fields' => [
sub { my $row = shift;
- $state_hash{substr($row->censustract, 0, 2)} = 1;
- substr($row->censustract, 2, 3)
+ $state_hash{substr($row->censustract, 0, 2)}++;
+ substr($row->censustract, 2, 3) || 'None'
+ },
+ sub { my $row = shift;
+ substr($row->censustract, 5) || 'None'
},
- sub { my $row = shift; substr($row->censustract, 5) },
'upload',
'download',
'technology_code',
- sub { $cgi->param('_type') eq 'xml' ? '0' : '' }, # doesn't really work
+ sub { $cgi->param('_type') eq 'xml' ? '0' : '' },#broken
'quantity',
sub { my $row = shift; sprintf "%.2f", $row->residential },
],
@@ -134,8 +129,8 @@ my $link = 'cust_pkg.cgi?'. join(';',
map { my $key = $_;
my @values = ref($search_hash{$_})
? @{ $search_hash{$_} }
- : $search_hash{$_}
- map { "$key=$_" } @values
+ : $search_hash{$_};
+ map { "$key=$_" } @values;
}
keys %search_hash
). ';';
@@ -148,4 +143,27 @@ my $link_suffix = sub { my $row = shift;
if @column_option[$row->download - 1];
$result;
};
+
+my $html_foot = sub {
+ if (scalar(keys %state_hash) > 1) {
+ '
WARNING: multiple states found
'.
+ '
'. + ( &FS::Report::FCC_477::statenum2state($_) || 'None' ). + ' | '. + ''. + qq(). + $state_hash{$_}. ' census tracts'. + ' | '. + '