From: ivan Date: Sat, 15 Apr 2006 00:16:31 +0000 (+0000) Subject: add a total column X-Git-Tag: BEFORE_FINAL_MASONIZE~171 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=6a5ebd04bc59509c5fb934d226d6dd144cf034bd add a total column --- 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); %> <%= $column %> <% } %> + Total <% 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}} ) { %> <%= $link ? $link. 'begin='. shift(@speriod). ';end='. shift(@eperiod). '">' : '' %>$<%= sprintf("%.2f", $column) %><%= $link ? '' : '' %> + <% $total += $column; %> <% } %> + <%= sprintf("%.2f", $total) %> <% } %>