freeside/httemplate/search cust_main.cgi,1.45,1.46
ivan
ivan at pouncequick.420.am
Mon Dec 6 06:00:46 PST 2004
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory pouncequick:/tmp/cvs-serv26387/httemplate/search
Modified Files:
cust_main.cgi
Log Message:
1st try at adding custom field handling
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main.cgi,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- cust_main.cgi 6 Dec 2004 06:56:56 -0000 1.45
+++ cust_main.cgi 6 Dec 2004 14:00:43 -0000 1.46
@@ -279,6 +279,7 @@
}
print ' cancelled customers</a> )';
}
+
if ( $cgi->param('referral_custnum') ) {
$cgi->param('referral_custnum') =~ /^(\d+)$/
or eidiot "Illegal referral_custnum\n";
@@ -314,6 +315,13 @@
'</FORM>';
}
+ 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 "<BR><BR>". $pager. &table(). <<END;
<TR>
<TH></TH>
@@ -390,12 +398,28 @@
}
foreach my $addl_col ( @addl_cols ) {
- print "<TD ROWSPAN=$rowspan>".
- qq!<A HREF="${p}rt/Search/Results.html?Order=ASC&Query=%20MemberOf%20%3D%20%27freeside%3A%2F%2Ffreeside%2Fcust_main%2F!.
- $cust_main->custnum.
- qq!%27%20%20AND%20%28%20Status%20%3D%20%27open%27%20%20OR%20Status%20%3D%20%27new%27%20%20OR%20Status%20%3D%20%27stalled%27%20%29%20&Rows=50&OrderBy=id&Page=1&Format=%27%20%20%20%3Cb%3E%3Ca%20href%3D%22%2Ffreeside%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%20%0A%27%3Cb%3E%3Ca%20href%3D%22%2Ffreeside%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%20%0A%27__Status__%27%2C%20%0A%27__QueueName__%27%2C%20%0A%27__OwnerName__%27%2C%20%0A%27__Priority__%27%2C%20%0A%27__NEWLINE__%27%2C%20%0A%27%27%2C%20%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%20%0A%27%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E%27%2C%20%0A%27%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E%27%2C%20%0A%27%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E%27%2C%20%0A%27%3Csmall%3E__TimeLeft__%3C%2Fsmall%3E%27">!.
- $cust_main->get($addl_col).
- "</A></TD>";
+ print "<TD ROWSPAN=$rowspan ALIGN=right>";
+ if ( $addl_col eq 'tickets' ) {
+ if ( @custom_priorities ) {
+ foreach my $priority ( @custom_priorities ) {
+ print '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum,$priority).
+ '">'.
+ FS::TicketSystem->num_customer_tickets($custnum,$priority).
+ " $priority</A><BR>";
+ }
+ }
+ print '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($cust_main->custnum, $p).
+ '">'.
+ $cust_main->get($addl_col);
+ print ' total'
+ if @custom_priorities;
+ print "</A>";
+ } else {
+ print $cust_main->get($addl_col);
+ }
+ print "</TD>";
}
my($n1)='';
More information about the freeside-commits
mailing list