summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-09-03 12:47:33 -0700
committerMark Wells <mark@freeside.biz>2013-09-03 12:47:33 -0700
commitaae697565c071b2880d0106b00a4a01d0ddab7bf (patch)
treed460784433d2b5a69101d02d8a446244a5452f33
parent35d24c449337f95d0e2174cbed55b53eb6c32ca2 (diff)
477 report: state percentages to 3 decimal places, #24834
-rwxr-xr-xhttemplate/search/477partIA.html6
-rwxr-xr-xhttemplate/search/477partIIA.html2
-rwxr-xr-xhttemplate/search/477partIIB.html2
-rwxr-xr-xhttemplate/search/477partVI_census.html2
4 files changed, 6 insertions, 6 deletions
diff --git a/httemplate/search/477partIA.html b/httemplate/search/477partIA.html
index 1cd0b70e0..5ee44dad5 100755
--- a/httemplate/search/477partIA.html
+++ b/httemplate/search/477partIA.html
@@ -139,7 +139,7 @@ for ( my $row = 0; $row < scalar @upload_option; $row++ ) {
my $count = FS::Record->scalar_sql($this_count_query);
my $residential = FS::Record->scalar_sql($this_count_query . $is_residential);
- my $percent = sprintf('%.2f', $count ? 100 * $residential / $count : 0);
+ my $percent = sprintf('%.3f', $count ? 100 * $residential / $count : 0);
$data[$col][$row] = [ $count, $percent ];
$total_count += $count;
@@ -149,10 +149,10 @@ for ( my $row = 0; $row < scalar @upload_option; $row++ ) {
}
my $total_percentage =
- sprintf("%.2f", $total_count ? 100*$total_residential/$total_count : 0);
+ sprintf("%.3f", $total_count ? 100*$total_residential/$total_count : 0);
my $above_200_percentage =
- sprintf("%.2f", $total_count ? 100*$above_200/$total_count : 0);
+ sprintf("%.3f", $total_count ? 100*$above_200/$total_count : 0);
my @summary_row = (
$total_count,
diff --git a/httemplate/search/477partIIA.html b/httemplate/search/477partIIA.html
index 95c00a3e0..907a176e5 100755
--- a/httemplate/search/477partIIA.html
+++ b/httemplate/search/477partIIA.html
@@ -104,7 +104,7 @@ if ( $total_lines > 0 ) {
foreach (@row_conds) {
my $sql = $query_ds0 . $_;
my $lines = FS::Record->scalar_sql($sql);
- my $percent = sprintf('%.2f', 100 * $lines / $total_lines);
+ my $percent = sprintf('%.3f', 100 * $lines / $total_lines);
push @{ $data[0] }, $percent;
}
}
diff --git a/httemplate/search/477partIIB.html b/httemplate/search/477partIIB.html
index 5b9b30769..cb181f4fd 100755
--- a/httemplate/search/477partIIB.html
+++ b/httemplate/search/477partIIB.html
@@ -120,7 +120,7 @@ foreach (@col_conds) {
if ( $col_data[0] == 0 ) {
$col_data[$row] = ''; # show nothing in this row, then
} else {
- $col_data[$row] = sprintf('%.2f', 100 * $count / $col_data[0]) . '%';
+ $col_data[$row] = sprintf('%.3f', 100 * $count / $col_data[0]) . '%';
}
} #if $row == 0
$row++;
diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html
index 59a6fb50d..0dafc6b21 100755
--- a/httemplate/search/477partVI_census.html
+++ b/httemplate/search/477partVI_census.html
@@ -75,7 +75,7 @@ push @fields,
$state_pkgcount{$state} += $row->quantity;
$row->quantity;
},
- sub { my $row = shift; sprintf "%.2f", $row->residential },
+ sub { my $row = shift; sprintf "%.3f", $row->residential },
;
my %search_hash = ();