%
my $conf = new FS::Conf;
my $mydomain = $conf->config('domain');
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
my $svcnum = $1;
my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
die "Unknown svcnum" unless $svc_acct;
#false laziness w/all svc_*.cgi
my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } );
my $pkgnum = $cust_svc->getfield('pkgnum');
my($cust_pkg, $custnum);
if ($pkgnum) {
$cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
$custnum = $cust_pkg->custnum;
} else {
$cust_pkg = '';
$custnum = '';
}
#eofalse
my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
die "Unknown svcpart" unless $part_svc;
my $domain;
if ( $svc_acct->domsvc ) {
my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } );
die "Unknown domain" unless $svc_domain;
$domain = $svc_domain->domain;
} else {
unless ( $mydomain ) {
die "No legacy domain config file and no svc_domain.svcnum record ".
"for svc_acct.domsvc: ". $cust_svc->domsvc;
}
$domain = $mydomain;
}
%>
<%= header('Account View', menubar(
( ( $pkgnum || $custnum )
? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
"View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
: ( "Cancel this (unaudited) account" =>
"javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" )
),
"Main menu" => $p,
)) %>
<%
#print qq!
Send account information!;
print qq!Edit this information
!.
&ntable("#cccccc"). '
'. encode_entities($password). ''; } else { print "(hidden)"; } print "