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;
}
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,
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;
}
}
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++;
$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 = ();