X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fappointments.html;h=fe98652456c7f43205348aca0086230ea3df2862;hb=2ed3ae34f224a4a78813afb45b35fe83ae6b1d82;hp=335bd208be2bfc74b7fddacd8a0f2cf704f395d5;hpb=660d0fe0876186513fdd4d6a2946816dc4a42db5;p=freeside.git
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 = '';
- <% mt('Type') |h %> |
+% if ( $custom_field ) {
+ <% mt('Type') |h %> |
+% }
<% mt('Date') |h %> |
<% mt('Status') |h %> |
<% mt('Owner') |h %> |
@@ -38,10 +40,12 @@
% if $starts > 86400;
-
-
- ><% 'custom field magic type' %>
- |
+
+% if ( $custom_field ) {
+
+ ><% $ticket->{"CF.{$custom_field}"} |h %>
+ |
+% }
><% $starts_pretty %>
@@ -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;
|