3 <& /elements/header.html, mt("View [_1] account",$svc) &>
4 <& /elements/small_custview.html, $custnum, '', 1,
5 "${p}view/cust_main.cgi" &>
9 % my $delmsg = emt('Permanently delete this account?');
12 function areyousure(href) {
13 if (confirm(<% $delmsg |js_string %>) == true)
14 window.location.href = href;
18 <& /elements/header.html, mt('View account'), menubar(
19 emt("Cancel this (unaudited) account") =>
20 "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')",
25 <& svc_acct/radius_usage.html,
26 'svc_acct' => $svc_acct,
27 'part_svc' => $part_svc,
28 'cust_pkg' => $cust_pkg,
32 <& svc_acct/change_svc_form.html,
33 'part_svc' => \@part_svc,
39 <% mt('Service #') |h %><B><% $svcnum %></B>
41 <& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &>
42 <& svc_acct/change_svc.html,
43 'part_svc' => \@part_svc,
47 <& svc_acct/basics.html,
48 'svc_acct' => $svc_acct,
49 'part_svc' => $part_svc,
56 <& svc_acct/cardfortress.html,
57 'svc_acct' => $svc_acct,
61 <& svc_acct/hosting.html,
65 %#remove this? does anybody even use it? it was a misunderstood customer
67 % my $conf = new FS::Conf;
68 % if ( $conf->exists('svc_acct-notes') ) {
69 % warn 'WARNING: svc_acct-notes deprecated\n';
70 <% join("<BR>", $conf->config('svc_acct-notes') ) %>
74 <& elements/svc_export_settings.html, $svc_acct &>
76 <% joblisting({'svcnum'=>$svcnum}, 1) %>
78 <& /elements/footer.html &>
82 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
84 my $addl_from = ' LEFT JOIN cust_svc USING ( svcnum ) '.
85 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
86 ' LEFT JOIN cust_main USING ( custnum ) ';
88 my($query) = $cgi->keywords;
91 my $svc_acct = qsearchs({
92 'select' => 'svc_acct.*',
93 'table' => 'svc_acct',
94 'addl_from' => $addl_from,
95 'hashref' => { 'svcnum' => $svcnum },
96 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
97 'null_right' => 'View/link unlinked services'
100 die "Unknown svcnum" unless $svc_acct;
102 #false laziness w/all svc_*.cgi
103 my $cust_svc = $svc_acct->cust_svc;
104 my $pkgnum = $cust_svc->getfield('pkgnum');
105 my($cust_pkg, $custnum);
107 $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
108 $custnum = $cust_pkg->custnum;
115 my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
116 die "Unknown svcpart" unless $part_svc;
117 my $svc = $part_svc->svc;
120 if ($FS::CurrentUser::CurrentUser->access_right('Change customer service')) {
123 @part_svc = grep { $_->svcdb eq 'svc_acct'
124 && $_->svcpart != $part_svc->svcpart }
125 $cust_pkg->available_part_svc;
127 @part_svc = qsearch('part_svc', {
130 svcpart => { op=>'!=', value=>$part_svc->svcpart },
136 my $communigate = scalar($part_svc->part_export('communigate_pro'));
137 # || scalar($part_svc->part_export('communigate_pro_singledomain'));
139 my %gopt = ( 'communigate' => $communigate,