X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partIIA.html;h=467b19c5fea624dd98d110ab84bd6e24bb526381;hb=3ef95c9cc6b8e9331879fcbf32962e88e3bc2c23;hp=95c00a3e06fc340986d950f4d26107f08319c6b7;hpb=f3e0ac2b009c4edd5692cb587ff709dac2223ebe;p=freeside.git diff --git a/httemplate/search/477partIIA.html b/httemplate/search/477partIIA.html index 95c00a3e0..467b19c5f 100755 --- a/httemplate/search/477partIIA.html +++ b/httemplate/search/477partIIA.html @@ -40,25 +40,25 @@ % } #XML/HTML <%init> - my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('List packages'); +my %opt = @_; my %search_hash = (); $search_hash{'agentnum'} = $cgi->param('agentnum'); $search_hash{'state'} = $cgi->param('state'); $search_hash{'classnum'} = [ $cgi->param('classnum') ]; -$search_hash{'status'} = 'active'; +$search_hash{'active'} = [ $opt{date}, $opt{date} ]; my @row_option; foreach ($cgi->param('part2a_row_option')) { push @row_option, (/^\d+$/ ? $_ : undef); } -my $is_residential = "AND COALESCE(cust_main.company, '') = ''"; +my $is_residential = " AND COALESCE(cust_main.company, '') = ''"; my $has_report_option = sub { map { defined($row_option[$_]) ? @@ -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; } }