X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partVI_census.html;h=534d872f39171e916e490fe51dae993b76811771;hb=10407ce25bbd219fa4df3bbf1f2c807e45eb9026;hp=dbaaaab611db8372d33486c366cad5b849b2d5ca;hpb=2f8745267b13bd027109e12e64b3e37fa50edb9d;p=freeside.git
diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html
index dbaaaab61..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,
@@ -32,10 +32,10 @@
sub { my $row = shift;
my $state = substr($row->censustract, 0, 2);
$state_hash{$state}++;
- substr($row->censustract, 2, 3) || 'None'
+ substr($row->censustract, 2, 3) || 'None';
},
sub { my $row = shift;
- substr($row->censustract, 5) || 'None'
+ substr($row->censustract, 5) || 'None';
},
'upload',
'download',
@@ -81,7 +81,8 @@ my %state_pkgcount = ();
for ( qw(agentnum magic) ) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
-$search_hash{'classnum'} = [ $cgi->param('classnum') ];
+$search_hash{'classnum'} = [ $cgi->param('classnum') ]
+ if grep { $_ eq 'classnum' } $cgi->param;
my @column_option = grep { /^\d+$/ } $cgi->param('part1_column_option')
if $cgi->param('part1_column_option');
@@ -143,15 +144,27 @@ my $link = 'cust_pkg.cgi?'. join(';',
my $link_suffix = sub { my $row = shift;
my $result = 'censustract='. $row->censustract. ';';
- $result .= 'report_option='. @row_option[$row->upload - 1]
- if @row_option[$row->upload - 1];
- $result .= 'report_option='. @column_option[$row->download - 1]
- if @column_option[$row->download - 1];
+ my @ro = grep $_,
+ @row_option[$row->upload - 1],
+ @column_option[$row->download - 2],
+ @technology_option[$row->technology_code - 1],
+ ;
+ $result .= 'report_option='. join(',',@ro) if @ro;
$result;
};
my $html_foot = sub {
if (scalar(keys %state_hash) > 1) {
+
+ my $roa_r = join(',', grep $_, @row_option);
+ $roa_r = ";report_option_any_r=$roa_r" if $roa_r;
+
+ my $roa_c = join(',', grep $_, @column_option);
+ $roa_c = ";report_option_any_c=$roa_c" if $roa_c;
+
+ my $roa_t = join(',', grep $_, @technology_option);
+ $roa_t = ";report_option_any_t=$roa_t" if $roa_t;
+
'
WARNING: multiple states found
'.
'
'. - qq(). - $state_pkgcount{$_}. ' packages in '. + qq(). + $state_pkgcount{$_}. + ' packages in '. $state_hash{$_}. ' census tracts'. ' | '. '