projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2.3.1
[freeside.git]
/
httemplate
/
search
/
svc_broadband.cgi
diff --git
a/httemplate/search/svc_broadband.cgi
b/httemplate/search/svc_broadband.cgi
index
7026f52
..
605b829
100755
(executable)
--- a/
httemplate/search/svc_broadband.cgi
+++ b/
httemplate/search/svc_broadband.cgi
@@
-8,28
+8,36
@@
'header' => [ '#',
'Service',
'Router',
'header' => [ '#',
'Service',
'Router',
+ @tower_header,
'IP Address',
'IP Address',
- FS::UI::Web::cust_header(),
+ FS::UI::Web::cust_header(
$cgi->param('cust_fields')
),
],
'fields' => [ 'svcnum',
'svc',
],
'fields' => [ 'svcnum',
'svc',
- sub { $routerbyblock{shift->blocknum}->routername; },
+ sub {
+ my $blocknum = shift->blocknum or return '';
+ $routerbyblock{$blocknum}->routername;
+ },
+ @tower_fields,
'ip_addr',
\&FS::UI::Web::cust_fields,
],
'links' => [ $link,
$link,
'ip_addr',
\&FS::UI::Web::cust_fields,
],
'links' => [ $link,
$link,
- $link_router,
+ '', #$link_router,
+ (map '', @tower_fields),
$link,
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
$link,
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
- FS::UI::Web::cust_header()
+ FS::UI::Web::cust_header(
$cgi->param('cust_fields')
)
),
],
),
],
- 'align' => 'rllr'. FS::UI::Web::cust_aligns(),
+ 'align' => 'rll'.('r' x @tower_fields).'r'.
+ FS::UI::Web::cust_aligns(),
'color' => [
'',
'',
'',
'color' => [
'',
'',
'',
+ (map '', @tower_fields),
'',
FS::UI::Web::cust_colors(),
],
'',
FS::UI::Web::cust_colors(),
],
@@
-37,6
+45,7
@@
'',
'',
'',
'',
'',
'',
+ (map '', @tower_fields),
'',
FS::UI::Web::cust_styles(),
],
'',
FS::UI::Web::cust_styles(),
],
@@
-57,7
+66,7
@@
else {
foreach (qw(custnum agentnum svcpart)) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
foreach (qw(custnum agentnum svcpart)) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
- foreach (qw(pkgpart routernum)) {
+ foreach (qw(pkgpart routernum
towernum sectornum
)) {
$search_hash{$_} = [ $cgi->param($_) ] if $cgi->param($_);
}
}
$search_hash{$_} = [ $cgi->param($_) ] if $cgi->param($_);
}
}
@@
-68,6
+77,14
@@
if ( $cgi->param('sortby') =~ /^(\w+)$/ ) {
my $sql_query = FS::svc_broadband->search(\%search_hash);
my $sql_query = FS::svc_broadband->search(\%search_hash);
+my @tower_header;
+my @tower_fields;
+if ( FS::tower_sector->count > 0 ) {
+ push @tower_header, 'Tower/Sector';
+ push @tower_fields, sub { $_[0]->tower_sector ?
+ $_[0]->tower_sector->description : '' };
+}
+
my %routerbyblock = ();
foreach my $router (qsearch('router', {})) {
foreach ($router->addr_block) {
my %routerbyblock = ();
foreach my $router (qsearch('router', {})) {
foreach ($router->addr_block) {
@@
-78,9
+95,10
@@
foreach my $router (qsearch('router', {})) {
my $link = [ $p.'view/svc_broadband.cgi?', 'svcnum' ];
#XXX get the router link working
my $link = [ $p.'view/svc_broadband.cgi?', 'svcnum' ];
#XXX get the router link working
-my $link_router = sub { my $routernum = $routerbyblock{shift->blocknum}->routernum;
- [ $p.'view/router.cgi?'.$routernum, 'routernum' ];
- };
+#my $link_router = sub {
+# my $routernum = $routerbyblock{shift->blocknum}->routernum;
+# [ $p.'view/router.cgi?'.$routernum, 'routernum' ];
+#};
my $link_cust = [ $p.'view/cust_main.cgi?', 'custnum' ];
my $link_cust = [ $p.'view/cust_main.cgi?', 'custnum' ];