X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Findex.html;h=1a92b45f626deee16c521edbee6324050ed14d37;hb=0a7d9371d3514312edd8661c621876cece4d5221;hp=360cc55e9908fd55ff7aeb6f69b03a0a9987b57c;hpb=0d1d2630e726ab4ce32bab9c3e4a889eee43fcb4;p=freeside.git
diff --git a/httemplate/index.html b/httemplate/index.html
index 360cc55e9..1a92b45f6 100644
--- a/httemplate/index.html
+++ b/httemplate/index.html
@@ -1,280 +1,59 @@
-
<% my $conf = new FS::Conf; %>
-
-
-
- Freeside Main Menu
-
-
-
-
-
-
-
- |
-
- <%= $conf->config('company_name') %> Billing
- |
- Logged in as <%= getotaker %>
- |
-
-
-
+<%= include('/elements/header.html', 'Billing Main' ) %>
-
+ my $sth = dbh->prepare(
+ #"SELECT DISTINCT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
+ "SELECT custnum FROM h_cust_main JOIN cust_main USING ( custnum )
+ WHERE ( history_action = 'insert' OR history_action = 'replace_new' )
+ AND history_user = ?
+ ORDER BY history_date desc" # LIMIT 10
+ ) or die dbh->errstr;
- |
-
-
+ $sth->execute( getotaker() ) or die $sth->errstr;
-
+ my %saw = ();
+ my @custnums = grep { !$saw{$_}++ } map $_->[0], @{ $sth->fetchall_arrayref };
+ @custnums = splice(@custnums, 0, 10);
-[ Sales / Customer service ]
-<% if ( $conf->config('ticket_system') ) { %>
- [ Support / Ticketing ]
-<% } %>
-[ Bookkeeping / Collections ]
-[ Reports ]
-[ Sysadmin ]
-
-
-
-
-<% if ( $conf->config('ticket_system') ) { %>
+ if ( @custnums ) {
-[ Sales / Customer service ]
-[ Support / Ticketing ]
-[ Bookkeeping / Collections ]
-[ Reports ]
-[ Sysadmin ]
-
+%>
-
-
-<% } %>
+ <%= include('/elements/table-grid.html') %>
+ <% my $bgcolor1 = '#eeeeee';
+ my $bgcolor2 = '#ffffff';
+ my $bgcolor;
+ %>
-[ Sales / Customer service ]
-<% if ( $conf->config('ticket_system') ) { %>
- [ Support / Ticketing ]
-<% } %>
-[ Bookkeeping / Collections ]
-[ Reports ]
-[ Sysadmin ]
-
+
+ Customers I recently added or modified |
+
+ <% foreach my $custnum ( @custnums ) { %>
+ <% my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); %>
+ <% next unless $cust_main; %>
+
+ <%= $custnum %>: <%= $cust_main->name %> |
+
-
+ <%
+ if ( $bgcolor eq $bgcolor1 ) {
+ $bgcolor = $bgcolor2;
+ } else {
+ $bgcolor = $bgcolor1;
+ }
+ %>
+ <% } %>
+
-[ Sales / Customer service ]
-<% if ( $conf->config('ticket_system') ) { %>
- [ Support / Ticketing ]
<% } %>
-[ Bookkeeping / Collections ]
-[ Reports ]
-[ Sysadmin ]
-
+<%= include('/elements/footer.html') %>
-
-
-
-
-
-[ Sales / Customer service ]
-<% if ( $conf->config('ticket_system') ) { %>
- [ Support / Ticketing ]
-<% } %>
-[ Bookkeeping / Collections ]
-[ Reports ]
-[ Sysadmin ]
-
-
-
-
-
-
-
-
-
-
-