[freeside-commits] freeside/httemplate/graph money_time.cgi, 1.7, 1.8

Ivan,,, ivan at wavetail.420.am
Fri Apr 14 17:16:34 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/graph
In directory wavetail:/tmp/cvs-serv7975

Modified Files:
	money_time.cgi 
Log Message:
add a total column

Index: money_time.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/graph/money_time.cgi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- money_time.cgi	3 Mar 2006 15:02:33 -0000	1.7
+++ money_time.cgi	15 Apr 2006 00:16:31 -0000	1.8
@@ -77,6 +77,7 @@
      %>
      <TH><%= $column %></TH>
 <% } %>
+  <TH>Total</TH>
 </TR>
 
 <% foreach my $row (@items) { %>
@@ -86,12 +87,15 @@
        : '';
      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>



More information about the freeside-commits mailing list