X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_external.cgi;h=833e86247153d9505896ba386b1a199750b8b40b;hb=3888fd6d1902f93c19d62df186e04617357f58c5;hp=553d2362a6870e746a9730bdc6e0632c2b79bc17;hpb=f9938915b0df2609f41c24d761d607595d5d0a34;p=freeside.git
diff --git a/httemplate/view/svc_external.cgi b/httemplate/view/svc_external.cgi
index 553d2362a..833e86247 100644
--- a/httemplate/view/svc_external.cgi
+++ b/httemplate/view/svc_external.cgi
@@ -1,6 +1,6 @@
<% include("/elements/header.html",'External Service View', menubar(
( ( $custnum )
- ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+ ? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
)
: ( "Cancel this (unaudited) external service" =>
"${p}misc/cancel-unaudited.cgi?$svcnum" )
@@ -23,6 +23,10 @@
+
+
+<& /elements/table-tickets.html, object => $cust_svc &>
+
<% joblisting({'svcnum'=>$svcnum}, 1) %>
<% include('/elements/footer.html') %>
@@ -41,7 +45,9 @@ my $svc_external = qsearchs({
' LEFT JOIN cust_pkg USING ( pkgnum ) '.
' LEFT JOIN cust_main USING ( custnum ) ',
'hashref' => { 'svcnum' => $svcnum },
- 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+ 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
+ 'null_right' => 'View/link unlinked services'
+ ),
}) or die "svc_external: Unknown svcnum $svcnum";
my $conf = new FS::Conf;
@@ -49,10 +55,11 @@ my $conf = new FS::Conf;
#false laziness w/all svc_*.cgi
my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
+my($cust_pkg, $custnum, $display_custnum);
if ($pkgnum) {
$cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
$custnum = $cust_pkg->custnum;
+ $display_custnum = $cust_pkg->cust_main->display_custnum;
} else {
$cust_pkg = '';
$custnum = '';