Changes rolling out beta version
[hcoop/portal.git] / balances.mlt
index d2c19c9..250d28c 100644 (file)
@@ -46,7 +46,8 @@ elseif $"mod" <> "" then
 
 <% end %>
 
-<% if showNormal then %>
+<% if showNormal then
+       ref total = 0.0 %>
 <h3><b>New balance</b></h3>
 
 <form action="balances">
@@ -59,11 +60,14 @@ elseif $"mod" <> "" then
 <h3><b>Manage current balances</b></h3>
 
 <table>
-<% foreach balance in Balance.listBalances () do %>
+<% foreach balance in Balance.listBalances () do
+       total := Util.add (total, #amount balance) %>
        <tr> <td><% Web.html (#name balance) %></td> <td><% #amount balance %></td> <td><a href="balances?mod=<% #id balance %>">[Modify]</a> <a href="balances?del=<% #id balance %>">[Delete]</a></td> </tr>
 <% end %>
 </table>
 
+<br><b>Total</b>: $<% total %>
+
 <% end %>
 
 <% @footer [] %>