) {
my %search = ();
+
if ( $cgi->param('browse') ) {
my $query = $cgi->param('browse');
if ( $query eq 'custnum' ) {
} else {
$sortby = \*last_sort; #??
$orderby = "ORDER BY LOWER(last || ' ' || first)"; #??
- if ( $cgi->param('otaker_on') ) {
- $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n";
- $search{otaker} = $1;
- } elsif ( $cgi->param('agentnum_on') ) {
- $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n";
- $search{agentnum} = $1;
- } else {
- die "unknown query...";
- }
+ }
+
+ if ( $cgi->param('otaker_on') ) {
+ $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n";
+ $search{otaker} = $1;
+ } elsif ( $cgi->param('agentnum_on') ) {
+ $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n";
+ $search{agentnum} = $1;
+# } else {
+# die "unknown query...";
}
my @qual = ();
or eidiot "Illegal referral_custnum\n";
my $referral_custnum = $1;
my $cust_main = qsearchs('cust_main', { custnum => $referral_custnum } );
- print '<FORM METHOD=POST>'.
+ print '<FORM METHOD="GET">'.
qq!<INPUT TYPE="hidden" NAME="referral_custnum" VALUE="$referral_custnum">!.
'referrals of <A HREF="'. popurl(2).
"view/cust_main.cgi?$referral_custnum\">$referral_custnum: ".
}
foreach my $addl_col ( @addl_cols ) {
- print "<TD ROWSPAN=$rowspan ALIGN=right>";
+ print "<TD ROWSPAN=$rowspan ALIGN=right><FONT SIZE=-1>";
if ( $addl_col eq 'tickets' ) {
if ( @custom_priorities ) {
- print '<TABLE>';
+ print &itable('', 0);
foreach my $priority ( @custom_priorities, '' ) {
- my $ahref =
- '<A HREF="'.
- FS::TicketSystem->href_customer_tickets($custnum,$priority).
- '">';
- print "<TR><TD ALIGN=right>$ahref".
- FS::TicketSystem->num_customer_tickets($custnum,$priority).
- "</A></TD>".
- "<TD ALIGN=left>$ahref".
+
+ my $num =
+ FS::TicketSystem->num_customer_tickets($custnum,$priority);
+ my $ahref = '';
+ $ahref= '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum,$priority).
+ '">'
+ if $num;
+
+ print '<TR>'.
+ " <TD ALIGN=right><FONT SIZE=-1>$ahref$num</A></FONT></TD>".
+ "<TD ALIGN=left><FONT SIZE=-1>$ahref".
( $priority || '<i>(none)</i>' ).
- </A></TD></TR>";
+ "</A></FONT></TD></TR>";
+
}
- print '<TR><TD BGCOLOR="#000000" COLSPAN=2> </TD></TR>'.
- '<TR><TD ALIGN=right>';
+ print '<TR><TD BGCOLOR="#000000" COLSPAN=2></TD></TR>'.
+ '<TR><TD ALIGN=right><FONT SIZE=-1>';
}
- my $ahref =
- '<A HREF="'.
- FS::TicketSystem->href_customer_tickets($custnum).
- '">';
+
+ my $ahref = '';
+ $ahref = '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum).
+ '">'
+ if $cust_main->get($addl_col);
+
print $ahref. $cust_main->get($addl_col). '</A>';
- print "</TD><TD ALIGN=left>${ahref}Total</A></TD></TR></TABLE>"
+ print "</FONT></TD><TD ALIGN=left>".
+ "<FONT SIZE=-1>${ahref}Total</A><FONT>".
+ "</TD></TR></TABLE>"
if @custom_priorities;
+
} else {
print $cust_main->get($addl_col);
}
- print "</TD>";
+ print "</FONT></TD>";
}
my($n1)='';