% my $row = 1;
% foreach my $cell ( @$col_data ) {
% my $el = $xml_prefix . $col . $row; # PartIA_Af1, PartIA_Af2...
+% if ( $cell->[0] > 0 ) {
<<% $el %>><% $cell->[0] %><<% "/$el" %>>
-% if ( $percentages ) {
-% $el = $xml_percent . $col . $row; # Part_p_IA_Af1, ...
+% if ( $percentages ) {
+% $el = $xml_percent . $col . $row; # Part_p_IA_Af1, ...
<<% $el %>><% $cell->[1] %><<% "/$el" %>>
+% }
% }
% $row++;
% } # foreach $cell
</TD>
% for (my $col = 0; $col < scalar(@download_option); $col++) {
<TD>
+% if ( $data[$col][$row][0] > 0 ) {
<% $data[$col][$row][0] %>
-% if ( $percentages ) {
+% if ( $percentages ) {
<BR><% $data[$col][$row][1] %>
+% }
% }
</TD>
% } # for $col
for ( qw(agentnum state) ) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
-$search_hash{'status'} = 'active';
$search_hash{'country'} = 'US';
$search_hash{'classnum'} = [ $cgi->param('classnum') ];
# whether to show residential percentages in each cell of the matrix
my $percentages = ($technology eq 'Terrestrial Mobile Wireless');
+# as of date
+# FCC 477 instructions: "Only count connections that are in service."
+# So we count packages that were in active status as of the specified date,
+# not over any sort of range.
+$search_hash{'active'} = [ $opt{date}, $opt{date} ];
+
my $query = FS::cust_pkg->search(\%search_hash);
my $count_query = $query->{'count_query'};