blob: 72d68152acab2e35d1284435161bd8d09e8ac1b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<%
my( $cust_main ) = @_;
my $conf = new FS::Conf;
my $num = 10;
my @tickets = ();
unless ( $conf->config('ticket_system-custom_priority_field') ) {
@tickets =
@{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) };
} else {
foreach my $priority (
$conf->config('ticket_system-custom_priority_field-values'), ''
) {
last if scalar(@tickets) >= $num;
push @tickets,
@{ FS::TicketSystem->customer_tickets( $cust_main->custnum,
$num - scalar(@tickets),
$priority,
)
};
}
}
%>
Highest priority tickets
(<A HREF="<%= FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>)
(<A HREF="<%= FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">New ticket for this customer</A>)
<%= table() %>
<TR>
<TH>#</TH>
<TH>Subject</TH>
<TH>Priority</TH>
<TH>Queue</TH>
<TH>Status</TH>
</TR>
<% foreach my $ticket ( @tickets ) {
my $href = FS::TicketSystem->href_ticket($ticket->{id});
%>
<TR>
<TD><A HREF=<%=$href%>><%= $ticket->{id} %></A></TD>
<TD><A HREF=<%=$href%>><%= $ticket->{subject} %></A></TD>
<TD ALIGN="right"><%= $ticket->{content} || $ticket->{priority} %></TD>
<TD><%= $ticket->{name} %></TD>
<TD><%= $ticket->{status} %></TD>
</TR>
<% } %>
</TABLE>
|