3 %# <% include("/elements/header.html","View $svcdomain") %>
4 <% include("/elements/header.html","View domain") %>
5 <% include( '/elements/small_custview.html', $custnum, '', 1,
6 "${p}view/cust_main.cgi") %>
11 <% include("/elements/header.html",'View domain', menubar(
12 "Cancel this (unaudited) domain" =>
13 "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?')",
19 <% include('/elements/error.html') %>
21 <% include('svc_domain/basics.html', $svc_domain,
22 'part_svc' => $part_svc,
23 'custnum' => $custnum,
28 <% include('svc_domain/acct_defaults.html', $svc_domain,
29 'part_svc' => $part_svc,
34 <% include('svc_domain/dns.html', $svc_domain ) %>
37 <% include('elements/svc_export_settings.html', $svc_domain) %>
39 <& /elements/table-tickets.html, object => $cust_svc &>
41 <% joblisting({'svcnum'=>$svcnum}, 1) %>
43 <% include('/elements/footer.html') %>
47 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
49 my $conf = new FS::Conf;
51 my($query) = $cgi->keywords;
54 my $svc_domain = qsearchs({
55 'select' => 'svc_domain.*',
56 'table' => 'svc_domain',
57 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
58 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
59 ' LEFT JOIN cust_main USING ( custnum ) ',
60 'hashref' => {'svcnum'=>$svcnum},
61 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
62 'null_right' => 'View/link unlinked services'
65 die "Unknown svcnum" unless $svc_domain;
67 my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
68 my $pkgnum = $cust_svc->getfield('pkgnum');
69 my($cust_pkg, $custnum, $display_custnum);
71 $cust_pkg = qsearchs('cust_pkg', {'pkgnum'=>$pkgnum} );
72 $custnum = $cust_pkg->custnum;
73 $display_custnum = $cust_pkg->cust_main->display_custnum;
79 my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
80 die "Unknown svcpart" unless $part_svc;
82 my $domain = $svc_domain->domain;