X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477.html;h=244bfa1df1df3b213f777a2686dac50431b129b9;hb=06fd3d9f3ca53b2d2f7595e55be4b129ca69511c;hp=26bd9f33ba98181086b0248de430739db8f46d18;hpb=0f359d5480aa1621d73ee802f420e8951abc620d;p=freeside.git
diff --git a/httemplate/search/477.html b/httemplate/search/477.html
index 26bd9f33b..244bfa1df 100644
--- a/httemplate/search/477.html
+++ b/httemplate/search/477.html
@@ -41,7 +41,7 @@ a.download {
% $cgi->param('type', 'csv');
- <% $parttitle{$partname} %>
+ <% $part_titles->{$partname} %>
Download
% my $header = ".header_$partname";
@@ -49,13 +49,23 @@ a.download {
<& $header &>
+% my $rownum = 0;
% foreach my $row (@$data) {
+% my $first = 1;
% foreach my $item (@$row) {
- <% $item %> |
+
+% if ($first and $part_link{$partname}) {
+ "><% $item || '(empty)' %>
+% $first = 0;
+% } else {
+ <% $item %>
% }
+ |
+% } #foreach $item
-% }
+% $rownum++;
+% } #foreach $row
% } # foreach $partname
<& /elements/footer.html &>
@@ -64,6 +74,7 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List packages');
my %parts;
+my %part_link;
# load from cache if possible
my $session;
if ( $cgi->param('session') =~ /^(\d+)$/ ) {
@@ -80,12 +91,22 @@ if ($cgi->param('agentnum') =~ /^(\d+)$/ ) {
}
my $date = parse_datetime($cgi->param('date')) || time;
my @partnames = grep /^\w+$/, $cgi->param('parts');
+my $ignore_quantity = ($cgi->param('ignore_quantity') ? 1 : 0);
+
foreach my $partname (@partnames) {
- my $method = "report_$partname";
- $parts{$partname} ||= FS::Report::FCC_477->$method(
- date => $date,
- agentnum => $agentnum
+ $parts{$partname} ||= FS::Report::FCC_477->report( $partname,
+ date => $date,
+ agentnum => $agentnum,
+ ignore_quantity => $ignore_quantity,
);
+ my $detail_table = FS::Report::FCC_477->part_table($partname);
+ if ($detail_table eq 'cust_pkg') {
+ my $link = popurl(1).'cust_pkg.cgi?477part='.$partname.";date=$date;";
+ if ($agentnum) {
+ $link .= "agentnum=$agentnum;";
+ }
+ $part_link{$partname} = $link;
+ } # don't include detail links to deploy_blocks, that's pointless
}
$m->cache->set($session, \%parts, '1h');
@@ -109,8 +130,27 @@ if ( $cgi->param('type') eq 'csv' ) {
$m->abort;
}
+my $part_titles = FS::Report::FCC_477->parts;
+
%init>
-<%def .header_fixed_broadband>
+<%def .header_fbd>
+
+ Census Block |
+ DBA Name |
+ Technology |
+ Consumer? |
+ Advertised Speed (Mbps) |
+ Business? |
+ Contractual Speed (Mbps) |
+
+
+ Down |
+ Up |
+ Down |
+ Up |
+
+%def>
+<%def .header_fbs>
Census Tract |
Technology |
@@ -124,7 +164,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Consumer |
%def>
-<%def .header_fixed_voice>
+<%def .header_fvs>
Census Tract |
VoIP? |
@@ -135,7 +175,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Consumer |
%def>
-<%def .header_local_phone>
+<%def .header_lts>
State |
Wholesale |
@@ -193,7 +233,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Other |
%def>
-<%def .header_mobile_broadband>
+<%def .header_mbs>
%# unimplemented
State |
@@ -207,7 +247,7 @@ if ( $cgi->param('type') eq 'csv' ) {
Consumer |
%def>
-<%def .header_mobile_voice>
+<%def .header_mvs>
%# unimplemented
State |