custnum}++, @cust_main)
) {
@@ -391,9 +398,47 @@ END
}
foreach my $addl_col ( @addl_cols ) {
- print qq!!.
- $cust_main->get($addl_col).
- " | ";
+ print "";
+ if ( $addl_col eq 'tickets' ) {
+ if ( @custom_priorities ) {
+ print &itable('', 0);
+ foreach my $priority ( @custom_priorities, '' ) {
+
+ my $num =
+ FS::TicketSystem->num_customer_tickets($custnum,$priority);
+ my $ahref = '';
+ $ahref= ''
+ if $num;
+
+ print ''.
+ " $ahref$num | ".
+ "$ahref".
+ ( $priority || '(none)' ).
+ " | ";
+
+ }
+ print ' | '.
+ '';
+ }
+
+ my $ahref = '';
+ $ahref = ''
+ if $cust_main->get($addl_col);
+
+ print $ahref. $cust_main->get($addl_col). '';
+ print " | ".
+ "${ahref}Total".
+ " | "
+ if @custom_priorities;
+
+ } else {
+ print $cust_main->get($addl_col);
+ }
+ print " | ";
}
my($n1)='';