X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=7d15d1cfc9eec8cbe9c3b206f9cf86884e41ec25;hb=dda497584a2e12907bba7cf07051fe34ede63b32;hp=48fbf41bb9a3faa62fcded8a4a07c9d6387677a6;hpb=b5ca5dd85a6b1eacdc0888aedecadb716e625ec3;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 48fbf41bb..7d15d1cfc 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -279,6 +279,7 @@ if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) { } print ' cancelled customers )'; } + if ( $cgi->param('referral_custnum') ) { $cgi->param('referral_custnum') =~ /^(\d+)$/ or eidiot "Illegal referral_custnum\n"; @@ -314,6 +315,13 @@ END ''; } + my @custom_priorities = (); + if ( $conf->config('ticket_system-custom_priority_field') + && @{ $conf->config('ticket_system-custom_priority_field-values') } ) { + @custom_priorities = + $conf->config('ticket_system-custom_priority_field-values'); + } + print "

". $pager. &table(). < @@ -390,12 +398,28 @@ END } foreach my $addl_col ( @addl_cols ) { - print "". - qq!!. - $cust_main->get($addl_col). - ""; + print ""; + if ( $addl_col eq 'tickets' ) { + if ( @custom_priorities ) { + foreach my $priority ( @custom_priorities ) { + print ''. + FS::TicketSystem->num_customer_tickets($custnum,$priority). + " $priority
"; + } + } + print ''. + $cust_main->get($addl_col); + print ' total' + if @custom_priorities; + print ""; + } else { + print $cust_main->get($addl_col); + } + print ""; } my($n1)='';