1 <A NAME="tickets"><FONT SIZE="+2">Tickets</FONT></A>
4 (<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>)
5 (<A HREF="<% $res_link %>">View resolved tickets for this customer</A>)
7 (<A HREF="<% $new_link %>">Create new ticket for this customer</A>)
9 <% include("/elements/table-grid.html") %>
10 % my $bgcolor1 = '#eeeeee';
11 % my $bgcolor2 = '#ffffff';
15 <TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
16 <TH CLASS="grid" BGCOLOR="#cccccc">Subject</TH>
17 <TH CLASS="grid" BGCOLOR="#cccccc">Status</TH>
18 <TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH>
19 <TH CLASS="grid" BGCOLOR="#cccccc">Owner</TH>
20 <TH CLASS="grid" BGCOLOR="#cccccc">Priority</TH>
23 % foreach my $ticket ( @tickets ) {
24 % my $href = FS::TicketSystem->href_ticket($ticket->{id});
25 % if ( $bgcolor eq $bgcolor1 ) {
26 % $bgcolor = $bgcolor2;
28 % $bgcolor = $bgcolor1;
33 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
34 <A HREF=<%$href%>><% $ticket->{id} %></A>
37 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
38 <A HREF=<%$href%>><% $ticket->{subject} %></A>
41 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
42 <% $ticket->{status} %>
45 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
46 <% $ticket->{queue} %>
49 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
50 <% $ticket->{owner} %>
53 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
55 ? $ticket->{content}.' ('.$ticket->{priority}.')'
68 my( $cust_main ) = @_;
69 my( @tickets ) = $cust_main->tickets;
71 my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum);
72 my $openlabel = join('/', FS::TicketSystem->statuses );
74 my $res_link = FS::TicketSystem->href_customer_tickets(
76 { 'statuses' => [ 'resolved' ] }
79 my $new_link = FS::TicketSystem->href_new_ticket(
81 join(', ', $cust_main->invoicing_list_emailonly )