<% if showNormal then
val you = Init.getUser();
val bal = Balance.lookupBalance (#bal you);
- val deposit = Balance.depositAmount (#id bal) %>
+ val deposit = Balance.depositAmount (#id bal);
+ val showBal = Util.sub (#amount bal, deposit) %>
-<h3>Your balance: $<% Util.sub (#amount bal, deposit) %><br>
+<h3>Your balance: $<% showBal %><br>
Deposit: $<% deposit %></b> (3 months of dues at the minimal <a href="pledge">pledge level</a>)<br>
Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToId "hcoop"))) %></h3>
<input type="submit" value="Show">
</form>
+<% ref running = showBal %>
<table>
-<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
+<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Balance</b></td></tr>
<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), lookback) do %>
-<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
-<% end %>
+<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td>
+<td><% running %></tr>
+<% running := Util.sub (running, amount)
+end %>
</table>
<% end
<% val you = Init.getUser();
val bal = Balance.lookupBalance (#bal you);
val deposit = Balance.depositAmount (#id bal);
+val showBal = Util.sub (#amount bal, deposit);
@header [] %>
<% @payment [] %>
<h3><a href="money">Your recent account activity</a></h3>
+<% ref running = showBal %>
<table>
-<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
+<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Balance</b></td></tr>
<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
-<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
-<% end %>
+<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td>
+<td><% running %></tr>
+<% running := Util.sub (running, amount)
+end %>
</table>
-<b>Balance: $<% Util.sub (#amount bal, deposit) %></b><br>
+<b>Balance: $<% showBal %></b><br>
<b>Deposit: $<% deposit %></b> (3 months of dues at the minimal <a href="pledge">pledge level</a>)
<!--b>Balance: $<% #amount bal %></b-->