summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/appointments.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main/appointments.html')
-rw-r--r--httemplate/view/cust_main/appointments.html36
1 files changed, 21 insertions, 15 deletions
diff --git a/httemplate/view/cust_main/appointments.html b/httemplate/view/cust_main/appointments.html
index 335bd208b..fe9865245 100644
--- a/httemplate/view/cust_main/appointments.html
+++ b/httemplate/view/cust_main/appointments.html
@@ -17,7 +17,9 @@
% my $bgcolor = '';
<TR>
- <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Type') |h %></TH>
+% if ( $custom_field ) {
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Type') |h %></TH>
+% }
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Owner') |h %></TH>
@@ -38,10 +40,12 @@
% if $starts > 86400;
<TR>
-
- <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <A HREF=<%$href%>><% 'custom field magic type' %></A>
- </TD>
+
+% if ( $custom_field ) {
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <A HREF=<%$href%>><% $ticket->{"CF.{$custom_field}"} |h %></A>
+ </TD>
+% }
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<A HREF=<%$href%>><% $starts_pretty %></A>
@@ -75,20 +79,22 @@ return '' unless $conf->config('ticket_system');
#my $object = $opt{'object'};
#$object = $object->cust_svc if $object->isa('FS::svc_Common');
-my( @tickets ) = $object->tickets; #XXX but actually appointments... filter by presense of the necessary CF? RT::Appointment instead of RT::Ticket ?
+my @tickets = $object->appointments;
-my ($openlabel, $open_link, $res_link, $thing);
-$openlabel = join('/', FS::TicketSystem->statuses );
+my $custom_field = $conf->config('ticket_system-appointment-custom_field');
+
+# my ($openlabel, $open_link, $res_link, $thing);
+# $openlabel = join('/', FS::TicketSystem->statuses );
# not the nicest way to do this--FS::has_tickets_Common?
#if ( $object->isa('FS::cust_main') ) {
- $thing = 'customer';
- $open_link = FS::TicketSystem->href_customer_tickets($object->custnum);
-
- $res_link = FS::TicketSystem->href_customer_tickets(
- $object->custnum,
- { 'statuses' => [ 'resolved' ] }
- );
+# $thing = 'customer';
+# $open_link = FS::TicketSystem->href_customer_tickets($object->custnum);
+#
+# $res_link = FS::TicketSystem->href_customer_tickets(
+# $object->custnum,
+# { 'statuses' => [ 'resolved' ] }
+# );
#} elsif ( $object->isa('FS::cust_svc') ) {
#
# return '' unless $object->pkgnum;