Undo bad change
[hcoop/portal.git] / money.mlt
index 1e1f692..236eda5 100644 (file)
--- a/money.mlt
+++ b/money.mlt
@@ -2,7 +2,17 @@
 
 ref showNormal = true;
 
-if $"cmd" = "list" then
+if $"hist" <> "" then
+       showNormal := false;
+       val id = Web.stoi ($"hist") %>
+<table>
+<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
+<% foreach (amount, trn) in Money.listUserTransactions id 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 %>
+</table>
+
+<% elseif $"cmd" = "list" then
        val admin = Group.inGroupName "money";
        showNormal := false %>
 
@@ -35,9 +45,9 @@ end %>
 <% switch Balance.listBalanceUsers (#id bal) of
          [] =>
        | (user :: users) =>
-               %><a href="user?id=<% #id user %>"><% Web.html (#name user) %></a><%
+               %><a href="money?hist=<% #id user %>"><% Web.html (#name user) %></a><%
                foreach user in users do
-                       %>, <a href="user?id=<% # id user %>"><% Web.html (#name user) %></a><%
+                       %>, <a href="money?hist=<% # id user %>"><% Web.html (#name user) %></a><%
                end
 end %></td> </tr>
 <% end %>