1 <%init>my $debug = $cgi->param('debug');</%init>
2 % warn time.": header.html\n" if $debug;
4 <& /elements/header.html, mt('Billing Main') &>
6 % warn time.": dashboard-install_welcome.html\n" if $debug;
8 <& /elements/dashboard-install_welcome.html &>
10 % warn time.": dashboard-toplist.html\n" if $debug;
12 <& /elements/dashboard-toplist.html &>
14 % warn time.": fetching recently changed customers\n" if $debug;
16 % my $sth = dbh->prepare(
17 % #"SELECT DISTINCT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
18 % "SELECT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
19 % WHERE ( history_action = 'insert' OR history_action = 'replace_new' )
20 % AND history_user = ?
21 % ORDER BY history_date desc" # LIMIT 10
22 % ) or die dbh->errstr;
24 % $sth->execute( getotaker() ) or die $sth->errstr;
27 % my @custnums = grep { !$saw{$_}++ } map $_->[0], @{ $sth->fetchall_arrayref };
29 % @custnums = splice(@custnums, 0, 10);
32 % warn time.": displaying recently changed customers\n" if $debug;
34 <& /elements/table-grid.html &>
36 % my $bgcolor1 = '#eeeeee';
37 % my $bgcolor2 = '#ffffff';
38 % my $bgcolor = $bgcolor2;
41 <TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=1><% mt('Customers I recently added or modified') |h %></TH>
44 % foreach my $custnum ( @custnums ) {
45 % my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
46 % next unless $cust_main;
49 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF="view/cust_main.cgi?<% $custnum %>"><% $cust_main->display_custnum %>: <% $cust_main->name %></A></TD>
52 % if ( $bgcolor eq $bgcolor1 ) {
53 % $bgcolor = $bgcolor2;
55 % $bgcolor = $bgcolor1;
64 <& /elements/footer.html &>