X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/5c705bcb58ea122dbd2b8163edc3e24c194d2ab1..1486ed1b6f35f6a1d0da2c1cc201cbf317a00931:/money.mlt?ds=inline diff --git a/money.mlt b/money.mlt index 7026421..dbad9a9 100644 --- a/money.mlt +++ b/money.mlt @@ -348,7 +348,7 @@ end %>
- + @@ -577,7 +577,8 @@ elseif $"cmd" = "freezeworthy" then
Description:
Description:
Date:
Amount/pledge:
<% foreach dq in dqs do %> - + +<% if #joinedThisMonth dq then %><% end %> <% end %>
Member Balance
<% #name dq %> $<% #balance dq %>
<% #name dq %> $<% #balance dq %>(joined this month)
@@ -587,7 +588,8 @@ elseif $"cmd" = "freezeworthy" then <% foreach dq in dqs do %> - + +<% if #joinedThisMonth dq then %><% end %> <% end %>
Member Balance
<% #name dq %> $<% #balance dq %>
<% #name dq %> $<% #balance dq %>(joined this month)
@@ -596,9 +598,10 @@ elseif $"cmd" = "freezeworthy" then <% 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) %> -

Your balance: $<% Util.sub (#amount bal, deposit) %>
+

Your balance: $<% showBal %>
Deposit: $<% deposit %> (3 months of dues at the minimal pledge level)
Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToId "hcoop"))) %>

@@ -660,22 +663,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

- Show most recent transactions. + Show most recent transactions.
+<% ref running = showBal; +val trans = iff lookback = 0 then + Money.listUserTransactions (Init.getUserId ()) + else + Money.listUserTransactionsLimit (Init.getUserId (), lookback) %> - -<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), lookback) do %> - -<% end %> + +<% foreach (amount, trn) in trans do %> + + + + +<% running := Util.sub (running, amount) +end %>
Date Description Amount
<% #d trn %> <% Web.html (#descr trn) %> <% amount %>/<% #amount trn %>
Date Description Debit Credit Balance
<% #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 %>
+<% if lookback <> 0 then %> +Show all transactions
+<% end %> <% end end %>