X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2F477.html;h=26bd9f33ba98181086b0248de430739db8f46d18;hp=68493377d7593f730de7f5e6d2ae433327777802;hb=0f359d5480aa1621d73ee802f420e8951abc620d;hpb=6c284750de8fe49d7d4cdc6a9a4fb618697780e2
diff --git a/httemplate/search/477.html b/httemplate/search/477.html
index 68493377d..26bd9f33b 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 %>
+ <% $parttitle{$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,10 @@ 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) {
+ my $method = "report_$partname";
+ $parts{$partname} ||= FS::Report::FCC_477->$method(
date => $date,
agentnum => $agentnum
);
@@ -93,11 +92,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"));
@@ -111,7 +110,7 @@ if ( $cgi->param('type') eq 'csv' ) {
}
%init>
-<%def .header6>
+<%def .header_fixed_broadband>
Census Tract |
Technology |
@@ -125,30 +124,18 @@ if ( $cgi->param('type') eq 'csv' ) {
Consumer |
%def>
-<%def .header7>
+<%def .header_fixed_voice>
- State |
- Speed (Mbps) |
- Subscriptions |
+ Census Tract |
+ VoIP? |
+ Lines/Subscriptions |
- Down |
- Up |
Total |
Consumer |
%def>
-<%def .header8>
-
- State |
- Subscriptions |
-
-
- Total |
- Direct |
-
-%def>
-<%def .header9>
+<%def .header_local_phone>
State |
Wholesale |
@@ -183,7 +170,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Wireless |
%def>
-<%def .header10>
+<%def .header_voip>
State |
VoIP OTT |
@@ -206,14 +193,29 @@ if ( $cgi->param('type') eq 'csv' ) {
Other |
%def>
-<%def .header11>
+<%def .header_mobile_broadband>
+%# unimplemented
- Census Tract |
- VoIP? |
- Lines/Subscriptions |
+ State |
+ Speed (Mbps) |
+ Subscriptions |
+ Down |
+ Up |
Total |
Consumer |
%def>
+<%def .header_mobile_voice>
+%# unimplemented
+
+ State |
+ Subscriptions |
+
+
+ Total |
+ Direct |
+
+%def>
+