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