X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/348c702ebdc2405076a39dc070b6c3831f704acc..0e737d9f261c698b705f5f388650ecb1d88f6749:/money.mlt
diff --git a/money.mlt b/money.mlt
index 0ac1b3b..fd3cc86 100644
--- a/money.mlt
+++ b/money.mlt
@@ -339,6 +339,27 @@ end %>
+<% elseif $"cmd" = "dues" then
+ Group.requireGroupName "money";
+ showNormal := false %>
+
+
Monthly dues
+
+
+Look up a Real Name
+
+
+
Most recent transactions
@@ -638,22 +687,34 @@ end %>
<% else %>
Switch to audit view
-<% val lookback = case $"lookback" of "" => 20 | lb => Web.stoi lb;
+<% val lookback = case $"lookback" of "" => 20 | "inf" => 0 | lb => Web.stoi lb;
@payment [] %>
Your recent account activity
+<% ref running = showBal;
+val trans = iff lookback = 0 then
+ Money.listUserTransactions (Init.getUserId ())
+ else
+ Money.listUserTransactionsLimit (Init.getUserId (), lookback) %>
- Date | Description | Amount |
-<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), lookback) do %>
- <% #d trn %> | <% Web.html (#descr trn) %> | <% amount %>/<% #amount trn %> |
-<% end %>
+ Date | Description | Debit | Credit | Balance |
+<% foreach (amount, trn) in trans do %>
+ <% #d trn %> | <% Web.html (#descr trn) %> |
+<% if Util.lt (amount, 0.0) then %><% amount %><% end %> |
+<% if Util.ge (amount, 0.0) then %><% amount %><% end %> |
+<% running %> |
+<% running := Util.sub (running, amount)
+end %>
+<% if lookback <> 0 then %>
+Show all transactions
+<% end %>
<% end
end %>