% % my( $cust_main ) = @_; % % my $conf = new FS::Conf; % my $num = $conf->config('cust_main-max_tickets') || 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 (View all tickets for this customer) (New ticket for this customer) <% include("/elements/table-grid.html") %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; % # Subject Priority Queue Status % foreach my $ticket ( @tickets ) { % my $href = FS::TicketSystem->href_ticket($ticket->{id}); % if ( $bgcolor eq $bgcolor1 ) { % $bgcolor = $bgcolor2; % } else { % $bgcolor = $bgcolor1; % } % ><% $ticket->{id} %> ><% $ticket->{subject} %> <% $ticket->{content} || $ticket->{priority} %> <% $ticket->{name} %> <% $ticket->{status} %> % }