X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2F477partIIB.html;h=bd56ecc60e0b49f20f32189c3e2a405222d81681;hp=ce1ac03f040d9594b3f3c5e7c8e0d0eedc1bcdfb;hb=f7d5af6176a79d0afcd67ba8bdd5a64d6c6af330;hpb=2c193dace8bcfc3e2b75bf6b1d28cf04bc45e2a0 diff --git a/httemplate/search/477partIIB.html b/httemplate/search/477partIIB.html index ce1ac03f0..bd56ecc60 100755 --- a/httemplate/search/477partIIB.html +++ b/httemplate/search/477partIIB.html @@ -118,11 +118,14 @@ foreach (@col_conds) { if ( $row == 0 ) { $col_data[$row] = $count; # the raw count } else { + # the rows that are percentages of the raw count if ( $col_data[0] == 0 ) { - $col_data[$row] = ''; # show nothing in this row, then + # 0 out of 0 is not 0%, but supposedly this works + $col_data[$row] = '0.000'; } else { - $col_data[$row] = sprintf('%.3f', 100 * $count / $col_data[0]) . '%'; + $col_data[$row] = sprintf('%.3f', 100 * $count / $col_data[0]); } + $col_data[$row] .= '%' unless $cgi->param('_type') eq 'xml'; } #if $row == 0 $row++; }