1 % my $conf = new FS::Conf;
3 <% include('/elements/header.html', 'Billing Main' ) %>
6 % my $sth = dbh->prepare(
7 % #"SELECT DISTINCT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
8 % "SELECT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
9 % WHERE ( history_action = 'insert' OR history_action = 'replace_new' )
10 % AND history_user = ?
11 % ORDER BY history_date desc" # LIMIT 10
12 % ) or die dbh->errstr;
14 % $sth->execute( getotaker() ) or die $sth->errstr;
17 % my @custnums = grep { !$saw{$_}++ } map $_->[0], @{ $sth->fetchall_arrayref };
19 % @custnums = splice(@custnums, 0, 10);
26 <% include('/elements/table-grid.html') %>
27 % my $bgcolor1 = '#eeeeee';
28 % my $bgcolor2 = '#ffffff';
34 <TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=1>Customers I recently added or modified</TH>
36 % foreach my $custnum ( @custnums ) {
37 % my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
38 % next unless $cust_main;
42 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF="view/cust_main.cgi?<% $custnum %>"><% $custnum %>: <% $cust_main->name %></A></TD>
45 % if ( $bgcolor eq $bgcolor1 ) {
46 % $bgcolor = $bgcolor2;
48 % $bgcolor = $bgcolor1;
58 <% include('/elements/footer.html') %>