%include("/elements/header.html",'Broadband Service View', menubar(
( ( $custnum )
? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
)
: ( "Cancel this (unaudited) website" =>
"${p}misc/cancel-unaudited.cgi?$svcnum" )
)
))
%>
<% include('/elements/init_overlib.html') %>
Edit this information
<%ntable("#cccccc")%>
<%ntable("#cccccc",2)%>
|
Service number |
<%$svcnum%> |
Description |
<%$description%> |
% if ( $router ) {
Router |
<%$router->routernum%>: <%$router->routername%> |
% }
Download Speed |
<%$speed_down%> |
Upload Speed |
<%$speed_up%> |
% if ( $ip_addr ) {
IP Address |
<%$ip_addr%>
(<% include('/elements/popup_link-ping.html', 'ip'=>$ip_addr ) %>)
|
IP Netmask |
<%$addr_block->NetAddr->mask%> |
IP Gateway |
<%$addr_block->ip_gateway%> |
% }
MAC Address |
<%$mac_addr%> |
Latitude |
<%$latitude%> |
Longitude |
<%$longitude%> |
Altitude |
<%$altitude%> |
VLAN Profile |
<%$vlan_profile%> |
Authentication Key |
<%$auth_key%> |
|
%
%foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
% print $svc_broadband->pvf($_)->widget('HTML', 'view',
% $svc_broadband->getfield($_)), "\n";
%}
%
%
<%ntable("#cccccc", 2)%>
%
% my $sb_router = qsearchs('router', { svcnum => $svcnum });
% if ($sb_router) {
%
Router associated: <%$sb_router->routername%>
(details)
% my @sb_addr_block;
% if (@sb_addr_block = $sb_router->addr_block) {
%
Address space
(edit)
% print ntable("#cccccc", 1);
% foreach (@sb_addr_block) {
<%$_->ip_gateway%>/<%$_->ip_netmask%> |
% }
% } else {
No address space allocated.
% }
%
% } else {
%
%
%}
%
<%joblisting({'svcnum'=>$svcnum}, 1)%>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
my $svcnum = $1;
my $svc_broadband = qsearchs({
'select' => 'svc_broadband.*',
'table' => 'svc_broadband',
'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
' LEFT JOIN cust_pkg USING ( pkgnum ) '.
' LEFT JOIN cust_main USING ( custnum ) ',
'hashref' => { 'svcnum' => $svcnum },
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
'null_right' => 'View/link unlinked services'
),
}) or die "svc_broadband: Unknown svcnum $svcnum";
#false laziness w/all svc_*.cgi
my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
my $pkgnum = $cust_svc->getfield('pkgnum');
my($cust_pkg, $custnum, $display_custnum);
if ($pkgnum) {
$cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
$custnum = $cust_pkg->custnum;
$display_custnum = $cust_pkg->cust_main->display_custnum;
} else {
$cust_pkg = '';
$custnum = '';
}
#eofalse
my $addr_block = $svc_broadband->addr_block;
my $router = $addr_block->router if $addr_block;
#if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
my (
$speed_down,
$speed_up,
$ip_addr,
$mac_addr,
$latitude,
$longitude,
$altitude,
$vlan_profile,
$auth_key,
$description,
) = (
$svc_broadband->getfield('speed_down'),
$svc_broadband->getfield('speed_up'),
$svc_broadband->getfield('ip_addr'),
$svc_broadband->mac_addr,
$svc_broadband->latitude,
$svc_broadband->longitude,
$svc_broadband->altitude,
$svc_broadband->vlan_profile,
$svc_broadband->auth_key,
$svc_broadband->description,
);
%init>