X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477.html;h=fb85f1e09b4771408a54c0c37d8b5192960482ee;hb=d7cf0d6bb3b81b1c91ef1bcc3252d56f96b65b0f;hp=68493377d7593f730de7f5e6d2ae433327777802;hpb=8fdc0ea36474cfb3d1389f41691c14598559cbe7;p=freeside.git
diff --git a/httemplate/search/477.html b/httemplate/search/477.html
index 68493377d..fb85f1e09 100644
--- a/httemplate/search/477.html
+++ b/httemplate/search/477.html
@@ -36,20 +36,19 @@ a.download {
float: right;
}
-% foreach my $partnum (@partnums) {
-% $cgi->param('parts', $partnum);
+% foreach my $partname (@partnames) {
+% $cgi->param('parts', $partname);
% $cgi->param('type', 'csv');
- Part <% $partnum %>
+ <% $part_titles->{$partname} %>
Download
-% my $header = ".header$partnum";
-% my $data = $parts{$partnum};
+% my $header = ".header_$partname";
+% my $data = $parts{$partname};
<& $header &>
-% #XXX column headings
% foreach my $row (@$data) {
% foreach my $item (@$row) {
@@ -58,7 +57,7 @@ a.download {
% }
-% } # foreach $partnum
+% } # foreach $partname
<& /elements/footer.html &>
<%init>
die "access denied"
@@ -80,10 +79,9 @@ if ($cgi->param('agentnum') =~ /^(\d+)$/ ) {
$agentnum = $1;
}
my $date = parse_datetime($cgi->param('date')) || time;
-my @partnums = grep /^\d+$/, $cgi->param('parts');
-foreach my $partnum (@partnums) {
- my $method = "part$partnum";
- $parts{$partnum} ||= FS::Report::FCC_477->$method(
+my @partnames = grep /^\w+$/, $cgi->param('parts');
+foreach my $partname (@partnames) {
+ $parts{$partname} ||= FS::Report::FCC_477->report( $partname,
date => $date,
agentnum => $agentnum
);
@@ -93,11 +91,11 @@ $m->cache->set($session, \%parts, '1h');
my $title = 'FCC Form 477 Data - ' . time2str('%b %o, %Y', $date);
if ( $cgi->param('type') eq 'csv' ) {
- my $partnum = $partnums[0]; # ignore any beyond the first
- my $data = $parts{$partnum};
+ my $partname = $partnames[0]; # ignore any beyond the first
+ my $data = $parts{$partname};
my $csv = Text::CSV_XS->new({ eol => "\r\n" }); # i think
- my $filename = time2str('%Y-%m-%d', $date) . '-part' . $partnum . '.csv';
+ my $filename = time2str('%Y-%m-%d', $date) . '-'. $partname . '.csv';
http_header('Content-Type' => 'text/csv');
http_header('Content-Disposition' => qq(attachment;filename="$filename"));
@@ -110,24 +108,30 @@ if ( $cgi->param('type') eq 'csv' ) {
$m->abort;
}
+my $part_titles = FS::Report::FCC_477->parts;
+
%init>
-<%def .header6>
+<%def .header_fbd>
- Census Tract |
+ Census Block |
+ DBA Name |
Technology |
- Speed (Mbps) |
- Subscriptions |
+ Consumer? |
+ Advertised Speed (Mbps) |
+ Business? |
+ Contractual Speed (Mbps) |
Down |
Up |
- Total |
- Consumer |
+ Down |
+ Up |
%def>
-<%def .header7>
+<%def .header_fbs>
- State |
+ Census Tract |
+ Technology |
Speed (Mbps) |
Subscriptions |
@@ -138,17 +142,18 @@ if ( $cgi->param('type') eq 'csv' ) {
Consumer |
%def>
-<%def .header8>
+<%def .header_fvs>
- State |
- Subscriptions |
+ Census Tract |
+ VoIP? |
+ Lines/Subscriptions |
Total |
- Direct |
+ Consumer |
%def>
-<%def .header9>
+<%def .header_lts>
State |
Wholesale |
@@ -183,7 +188,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Wireless |
%def>
-<%def .header10>
+<%def .header_voip>
State |
VoIP OTT |
@@ -206,14 +211,29 @@ if ( $cgi->param('type') eq 'csv' ) {
Other |
%def>
-<%def .header11>
+<%def .header_mbs>
+%# unimplemented
- Census Tract |
- VoIP? |
- Lines/Subscriptions |
+ State |
+ Speed (Mbps) |
+ Subscriptions |
+ Down |
+ Up |
Total |
Consumer |
%def>
+<%def .header_mvs>
+%# unimplemented
+
+ State |
+ Subscriptions |
+
+
+ Total |
+ Direct |
+
+%def>
+