<% end %>
-<% if showNormal then %>
+<% if showNormal then
+ ref total = 0.0 %>
<h3><b>New balance</b></h3>
<form action="balances">
<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 [] %>