summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-10-04 20:14:51 -0700
committerIvan Kohler <ivan@freeside.biz>2012-10-04 20:14:51 -0700
commit916836bcfff6d378e3bbdfde981bcf496b5c527c (patch)
tree6972bccab2754348d969e7eaa18f25c24eacdf09 /httemplate
parentc2aca3624124622e018f9cc1e02be0d0e93d3aa0 (diff)
fix unlinked service display, fallout from RT#17067
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/table-tickets.html10
-rw-r--r--httemplate/view/elements/svc_Common.html2
-rwxr-xr-xhttemplate/view/svc_acct.cgi2
-rwxr-xr-xhttemplate/view/svc_domain.cgi2
-rw-r--r--httemplate/view/svc_external.cgi2
-rwxr-xr-xhttemplate/view/svc_forward.cgi2
-rw-r--r--httemplate/view/svc_www.cgi2
7 files changed, 6 insertions, 16 deletions
diff --git a/httemplate/elements/table-tickets.html b/httemplate/elements/table-tickets.html
index 6d1a45a..ffcaf06 100644
--- a/httemplate/elements/table-tickets.html
+++ b/httemplate/elements/table-tickets.html
@@ -94,12 +94,12 @@ View
</TABLE>
<%init>
-use Date::Parse qw(str2time);
-use Date::Format qw(time2str);
my %opt = @_;
my $conf = new FS::Conf;
+return '' unless $conf->config('ticket_system');
+
my $object = $opt{'object'};
$object = $object->cust_svc if $object->isa('FS::svc_Common');
my( @tickets ) = $object->tickets;
@@ -116,8 +116,10 @@ if ( $object->isa('FS::cust_main') ) {
$object->custnum,
{ 'statuses' => [ 'resolved' ] }
);
-}
-elsif ( $object->isa('FS::cust_svc') ) {
+} elsif ( $object->isa('FS::cust_svc') ) {
+
+ return '' unless $object->pkgnum;
+
$thing = 'service';
$open_link = FS::TicketSystem->href_service_tickets($object->svcnum);
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html
index 04d2b29..f7c685c 100644
--- a/httemplate/view/elements/svc_Common.html
+++ b/httemplate/view/elements/svc_Common.html
@@ -114,9 +114,7 @@ function areyousure(href) {
% }
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<% joblisting({'svcnum'=>$svcnum}, 1) %>
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index 3ad21bb..1995913 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -76,9 +76,7 @@
<& elements/svc_export_settings.html, $svc_acct &>
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<BR>
<% joblisting({'svcnum'=>$svcnum}, 1) %>
diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi
index fcccd74..c9592a5 100755
--- a/httemplate/view/svc_domain.cgi
+++ b/httemplate/view/svc_domain.cgi
@@ -36,9 +36,7 @@
<% include('elements/svc_export_settings.html', $svc_domain) %>
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<% joblisting({'svcnum'=>$svcnum}, 1) %>
diff --git a/httemplate/view/svc_external.cgi b/httemplate/view/svc_external.cgi
index 72e5535..077dc77 100644
--- a/httemplate/view/svc_external.cgi
+++ b/httemplate/view/svc_external.cgi
@@ -24,9 +24,7 @@
</TABLE></TD></TR></TABLE>
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<BR><% joblisting({'svcnum'=>$svcnum}, 1) %>
diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi
index 2cb78eb..75c8f5c 100755
--- a/httemplate/view/svc_forward.cgi
+++ b/httemplate/view/svc_forward.cgi
@@ -53,9 +53,7 @@
<% include('elements/svc_export_settings.html', $svc_forward) %>
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<% joblisting({'svcnum'=>$svcnum}, 1) %>
diff --git a/httemplate/view/svc_www.cgi b/httemplate/view/svc_www.cgi
index fbb02a0..f51c760 100644
--- a/httemplate/view/svc_www.cgi
+++ b/httemplate/view/svc_www.cgi
@@ -49,9 +49,7 @@
</TABLE>
<BR>
-% if ( $conf->config('ticket_system') ) {
<& /elements/table-tickets.html, object => $cust_svc &>
-% }
<% joblisting({'svcnum'=>$svcnum}, 1) %>