X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=56b4f27d41515d299061a70ede82dd17a02cbe57;hb=a6595fa854b75f109450bf1af3cc9333ba9dc723;hp=b2f8befe780635c848740c3d99434d15fabf6f89;hpb=2e01e767e3ec53eca7193e4498a449d9d92b4f89;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index b2f8befe7..56b4f27d4 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(). < @@ -339,7 +347,6 @@ print <custnum}++, @cust_main) ) { @@ -391,9 +398,33 @@ END } foreach my $addl_col ( @addl_cols ) { - print qq!!. - $cust_main->get($addl_col). - ""; + print ""; + if ( $addl_col eq 'tickets' ) { + if ( @custom_priorities ) { + print ''; + foreach my $priority ( @custom_priorities ) { + my $ahref = + ''; + print "". + ""; + } + print "
$ahref". + FS::TicketSystem->num_customer_tickets($custnum,$priority). + "$ahref$priority
"; + } + my $ahref = + ''; + print $ahref. $cust_main->get($addl_col). ''; + print '${ahref}total
' + if @custom_priorities; + } else { + print $cust_main->get($addl_col); + } + print ""; } my($n1)='';