+ my $pship_company = $ship_company
+ ? qq!<A HREF="$view"><FONT SIZE=-1>$ship_company</FONT></A>!
+ : '<FONT SIZE=-1> </FONT>';
+ %>
+
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>" ROWSPAN=<%= $rowspan || 1 %>><A HREF="<%= $view %>"><FONT SIZE=-1><%= "$ship_last, $ship_first" %></FONT></A></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>" ROWSPAN=<%= $rowspan || 1 %>><%= $pship_company %></A></TD>
+
+ <% }
+
+ foreach my $addl_col ( @addl_cols ) { %>
+
+ <% if ( $addl_col eq 'tickets' ) { %>
+
+ <% if ( @custom_priorities ) { %>
+
+ <TD CLASS="inv" BGCOLOR="<%= $bgcolor %>" ROWSPAN=<%= $rowspan || 1 %> ALIGN=right><FONT SIZE=-1>
+
+ <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0>
+
+ <% foreach my $priority ( @custom_priorities, '' ) { %>
+
+ <%
+ my $num =
+ FS::TicketSystem->num_customer_tickets($custnum,$priority);
+ my $ahref = '';
+ $ahref= '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum,$priority).
+ '">'
+ if $num;
+ %>
+
+ <TR>
+ <TD ALIGN=right>
+ <FONT SIZE=-1><%= $ahref.$num %></A></FONT>
+ </TD>
+ <TD ALIGN=left>
+ <FONT SIZE=-1><%= $ahref %><%= $priority || '<i>(none)</i>' %></A></FONT>
+ </TD>
+ </TR>
+
+ <% } %>
+
+ <TR>
+ <TH ALIGN=right STYLE="border-top: dashed 1px black">
+ <FONT SIZE=-1>
+
+ <% } else { %>
+
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>" ROWSPAN=<%= $rowspan || 1 %> ALIGN=right><FONT SIZE=-1>
+
+ <% } %>
+
+ <%
+ my $ahref = '';
+ $ahref = '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum).
+ '">'
+ if $cust_main->get($addl_col);
+ %>
+
+ <%= $ahref %><%= $cust_main->get($addl_col) %></A>
+
+ <% if ( @custom_priorities ) { %>
+
+ </FONT></TH>
+ <TH ALIGN=left STYLE="border-top: dashed 1px black">
+ <FONT SIZE=-1><%= ${ahref} %>Total</A><FONT>
+ </TH>
+ </TR>
+ </TABLE>
+
+ <% } %>
+
+ </FONT></TD>
+
+ } else { %>
+
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>" ROWSPAN=<%= $rowspan || 1 %> ALIGN=right><FONT SIZE=-1>
+ <%= $cust_main->get($addl_col) %>
+ </FONT></TD>
+
+<%
+ }