X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partVI_census.html;h=534d872f39171e916e490fe51dae993b76811771;hb=b6dbe0f12dbbe4ea5209367f905f937789b5b607;hp=53b6db0629d013dc583a360a94a7e271e077f507;hpb=a6fcaaaeb031cfc5d4a32e75356208f1df965cb2;p=freeside.git diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html index 53b6db062..534d872f3 100755 --- a/httemplate/search/477partVI_census.html +++ b/httemplate/search/477partVI_census.html @@ -1,6 +1,6 @@ <% include( 'elements/search.html', 'html_init' => $html_init, - 'html_foot' => $html_foot,, + 'html_foot' => $html_foot, 'name' => 'regions', 'query' => [ @sql_query ], 'count_query' => $count_query, @@ -30,17 +30,22 @@ ], 'fields' => [ sub { my $row = shift; - $state_hash{substr($row->censustract, 0, 2)}++; - substr($row->censustract, 2, 3) || 'none' + my $state = substr($row->censustract, 0, 2); + $state_hash{$state}++; + substr($row->censustract, 2, 3) || 'None'; }, sub { my $row = shift; - substr($row->censustract, 5) || 'none' + substr($row->censustract, 5) || 'None'; }, 'upload', 'download', 'technology_code', sub { $cgi->param('_type') eq 'xml' ? '0' : '' },#broken - 'quantity', + sub { my $row = shift; + my $state = substr($row->censustract, 0, 2); + $state_pkgcount{$state} += $row->quantity; + $row->quantity; + }, sub { my $row = shift; sprintf "%.2f", $row->residential }, ], 'links' => [ @@ -71,11 +76,13 @@ my $html_init = '
$_ | ". - qq(). - $state_hash{$_}. ' | '. + ''. + ( &FS::Report::FCC_477::statenum2state($_) || 'None' ). + ' | '. + ''. + qq(). + $state_pkgcount{$_}. + ' packages in '. + $state_hash{$_}. ' census tracts'. + ' | '. '