summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorjeff <jeff>2010-09-01 18:48:20 +0000
committerjeff <jeff>2010-09-01 18:48:20 +0000
commitd5cc5b2fbb03670d2082cf2521aa9b9d8760d607 (patch)
treeb1c658d94468f3fedc33a0a201593b116279f4b4 /httemplate/search
parent01978afbd19eeebf30398df3d61052f14824d794 (diff)
fix xml tag for upper left corner of part ia and actually calculate the above 200kpbs residential percentage
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/477partIA_detail.html2
-rwxr-xr-xhttemplate/search/477partIA_summary.html9
2 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/search/477partIA_detail.html b/httemplate/search/477partIA_detail.html
index e4a59de5f..6fea39109 100755
--- a/httemplate/search/477partIA_detail.html
+++ b/httemplate/search/477partIA_detail.html
@@ -94,7 +94,7 @@ my $value = sub {
my $return = $count;
if ($cgi->param('_type') eq 'xml') {
- $rowchar++ if $column == 1;
+ $rowchar++ if $column == 0;
$xml_element = $xml_prefix. chr($rowchar). ($column+1);
$return = '' if $count == 0 and $cgi->param('_type') eq 'xml';
} else {
diff --git a/httemplate/search/477partIA_summary.html b/httemplate/search/477partIA_summary.html
index 269f2caf2..eb1c11607 100755
--- a/httemplate/search/477partIA_summary.html
+++ b/httemplate/search/477partIA_summary.html
@@ -26,7 +26,7 @@
sub { '100.00' },
sub { '100.00' },
sub { $total_percentage },
- sub { $total_percentage },
+ sub { $above_200_percentage },
],
)
%>
@@ -54,11 +54,13 @@ my @technology_option = &FS::Report::FCC_477::parse_technology_option($cgi);
my $total_count = 0;
my $total_residential = 0;
+my $above_200 = 0;
my $tech_code = $opt{tech_code};
my $technology = $FS::Report::FCC_477::technology[$tech_code] || 'unknown';
my $html_init = "<H2>Part IA $technology totals</H2>";
my $xml_prefix = 'PartIA_'. chr(65 + $tech_code);
+my $not_first_row = 0; # ugh;
foreach my $row ( @row_option ) {
foreach my $column ( @column_option ) {
@@ -70,11 +72,16 @@ foreach my $row ( @row_option ) {
$total_count += $count;
$total_residential += $residential;
+ $above_200 += $residential if $not_first_row;
}
+ $not_first_row++;
}
my $total_percentage =
sprintf("%.2f", $total_count ? 100*$total_residential/$total_count : 0);
+my $above_200_percentage =
+ sprintf("%.2f", $total_count ? 100*$above_200/$total_count : 0);
+
</%init>