+ foreach my $addl_col ( @addl_cols ) {
+ print "<TD ROWSPAN=$rowspan ALIGN=right>";
+ if ( $addl_col eq 'tickets' ) {
+ if ( @custom_priorities ) {
+ print '<TABLE>';
+ foreach my $priority ( @custom_priorities, '' ) {
+ my $ahref =
+ '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum,$priority).
+ '">';
+ print "<TR><TD ALIGN=right>$ahref".
+ FS::TicketSystem->num_customer_tickets($custnum,$priority).
+ "</A></TD>".
+ "<TD ALIGN=left>$ahref".
+ ( $priority || '<i>(none)</i>' ).
+ </A></TD></TR>";
+ }
+ print '<TR><TD BGCOLOR="#000000" COLSPAN=2> </TD></TR>'.
+ '<TR><TD ALIGN=right>';
+ }
+ my $ahref =
+ '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum).
+ '">';
+ print $ahref. $cust_main->get($addl_col). '</A>';
+ print "</TD><TD ALIGN=left>${ahref}Total</A></TD></TR></TABLE>"
+ if @custom_priorities;
+ } else {
+ print $cust_main->get($addl_col);
+ }
+ print "</TD>";
+ }
+