CDR Report: add top sources, top destinations, and longest calls report options,...
[freeside.git] / httemplate / view / cust_svc.cgi
1 <% $cgi->redirect(popurl(1)."$svcdb.cgi?". $svcnum ) %>
2 <%init>
3
4 #needed here?  we're just redirecting.  i guess it could reveal the svcdb of a
5 #svcnum... oooooo scary.  not.
6 die "access denied"
7   unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
8
9 #some false laziness w/svc_*.cgi
10
11 my($query) = $cgi->keywords;
12 $query =~ /^(\d+)$/;
13 my $svcnum = $1;
14 my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
15 die "Unknown svcnum" unless $cust_svc;
16
17 my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
18 die "Unknown svcpart" unless $part_svc;
19
20 my $svcdb = $part_svc->svcdb;
21
22 </%init>
23