X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=ecff4bf3b6581632ed00a043dd782345004e7684;hb=55a68e4aabe10db4d9c3ab1bb8befd2f9f4b9008;hp=778cdf2b02689478f26f00270ebbfd21ea8f1b76;hpb=22edb078bfa5aebdef81f7048a81f8336449cdbf;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 778cdf2b0..ecff4bf3b 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -398,36 +398,47 @@ END } foreach my $addl_col ( @addl_cols ) { - print ""; + print ""; if ( $addl_col eq 'tickets' ) { if ( @custom_priorities ) { print &itable('', 0); foreach my $priority ( @custom_priorities, '' ) { - my $ahref = - ''; - print "$ahref". - FS::TicketSystem->num_customer_tickets($custnum,$priority). - "". - "$ahref". + + my $num = + FS::TicketSystem->num_customer_tickets($custnum,$priority); + my $ahref = ''; + $ahref= '' + if $num; + + print ''. + " $ahref$num". + "$ahref". ( $priority || '(none)' ). - ""; + ""; + } print ''. - ''; + ''; } - my $ahref = - ''; + + my $ahref = ''; + $ahref = '' + if $cust_main->get($addl_col); + print $ahref. $cust_main->get($addl_col). ''; - print "${ahref}Total" + print "". + "${ahref}Total". + "" if @custom_priorities; + } else { print $cust_main->get($addl_col); } - print ""; + print ""; } my($n1)='';