,0
)
-order by company, last
+order by lower(company), lower(last)
END
<% while ( my $row = $sth->fetchrow_hashref() ) { %>
<TR>
<TD><A HREF="<%= $p %>view/cust_main.cgi?<%= $row->{'custnum'} %>">
- <%= $row->{'company'} ? $row->{'company'}. ' (' : '' %>
- <%= $row->{'last'}. ', '. $row->{'first'} %>
- <%= $row->{'company'} ? ')' : '' %></A>
+ <%= $row->{'company'} ? $row->{'company'}. ' (' : '' %><%= $row->{'last'}. ', '. $row->{'first'} %><%= $row->{'company'} ? ')' : '' %></A>
</TD>
<TD ALIGN="right">$<%= sprintf("%.2f", $row->{'owed_0_30'} ) %></TD>
<TD ALIGN="right">$<%= sprintf("%.2f", $row->{'owed_30_60'} ) %></TD>