diff options
author | ivan <ivan> | 2006-04-15 00:16:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-04-15 00:16:31 +0000 |
commit | 6a5ebd04bc59509c5fb934d226d6dd144cf034bd (patch) | |
tree | 7ec7d8795c2fec441b9e4e6dfcb45fedb5f89935 /httemplate/graph | |
parent | 2a2173b5c05b1273f3990ee5b914a2d9efac0c3f (diff) |
add a total column
Diffstat (limited to 'httemplate/graph')
-rw-r--r-- | httemplate/graph/money_time.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/httemplate/graph/money_time.cgi b/httemplate/graph/money_time.cgi index 874f58b09..9c0a94ff3 100644 --- a/httemplate/graph/money_time.cgi +++ b/httemplate/graph/money_time.cgi @@ -77,6 +77,7 @@ my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); %> <TH><%= $column %></TH> <% } %> + <TH>Total</TH> </TR> <% foreach my $row (@items) { %> @@ -86,12 +87,15 @@ my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); : ''; my @speriod = @{$data->{speriod}}; my @eperiod = @{$data->{eperiod}}; + my $total = 0; %> <% foreach my $column ( @{$data->{$row}} ) { %> <TD ALIGN="right" BGCOLOR="#ffffff"> <%= $link ? $link. 'begin='. shift(@speriod). ';end='. shift(@eperiod). '">' : '' %><FONT COLOR="#<%= $color{$row} %>">$<%= sprintf("%.2f", $column) %></FONT><%= $link ? '</A>' : '' %> </TD> + <% $total += $column; %> <% } %> + <TD><%= sprintf("%.2f", $total) %> </TR> <% } %> </TABLE> |