<%
my $conf = new FS::Conf;
+my $mydomain = $conf->config('domain');
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
die "Unknown domain" unless $svc_domain;
$domain = $svc_domain->domain;
} else {
- die "No svc_domain.svcnum record for svc_acct.domsvc: ". $cust_svc->domsvc;
+ 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",
+ ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
: ( "Cancel this (unaudited) account" =>
"javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" )
: $svc_acct->slipip
). "</TD>";
my($attribute);
- foreach $attribute ( grep /^radius_/, $svc_acct->fields ) {
+ foreach $attribute ( grep /^radius_/, fields('svc_acct') ) {
#warn $attribute;
$attribute =~ /^radius_(.*)$/;
my $pattribute = $FS::raddb::attrib{$1};
"<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute).
"</TD></TR>";
}
- foreach $attribute ( grep /^rc_/, $svc_acct->fields ) {
+ foreach $attribute ( grep /^rc_/, fields('svc_acct') ) {
#warn $attribute;
$attribute =~ /^rc_(.*)$/;
my $pattribute = $FS::raddb::attrib{$1};
print '<TR><TD ALIGN="right">RADIUS groups</TD><TD BGCOLOR="#ffffff">'.
join('<BR>', $svc_acct->radius_groups). '</TD></TR>';
-# Can this be abstracted further? Maybe a library function like
-# widget('HTML', 'view', $svc_acct) ? It would definitely make UI
-# style management easier.
-
-foreach (sort { $a cmp $b } $svc_acct->virtual_fields) {
- print $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)),
- "\n";
-}
-%>
-</TABLE></TD></TR></TABLE>
-<%
-
-print '<BR><BR>';
+print '</TABLE></TD></TR></TABLE><BR><BR>';
print join("\n", $conf->config('svc_acct-notes') ). '<BR><BR>'.
joblisting({'svcnum'=>$svcnum}, 1). '</BODY></HTML>';