X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/f8f485d8cde6e4617fa605a5284e293c557b9fc0..64264243ac899669f55285e53a5ba511bbac9340:/money.mlt diff --git a/money.mlt b/money.mlt index e846c3f..9129de9 100644 --- a/money.mlt +++ b/money.mlt @@ -7,7 +7,7 @@ ref showNormal = true; if $"hist" <> "" then showNormal := false; val id = Web.stoi ($"hist") %> - +
<% foreach (amount, trn) in Money.listUserTransactions id do %> @@ -20,7 +20,7 @@ if $"hist" <> "" then

Transactions

-
Date Description Amount
<% #d trn %> <% Web.html (#descr trn) %> <% amount %>/<% #amount trn %>
+
<% foreach trn in Money.listTransactions () do %> @@ -42,10 +42,10 @@ end %>

Primary Transactions

-
Date Description Amount Last modified Participants
<% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %> <% #stamp trn %>
+
<% foreach (amt, trn) in Money.listUserTransactions (valOf (Init.userNameToId "hcoop")) do %> - + <% switch Money.listChargesWithNames (#id trn) of [(name, cha)] => %><% | _ => %><% @@ -579,7 +579,7 @@ elseif $"cmd" = "checkout" then elseif $"cmd" = "delinq" then showNormal := false; val dqs = Money.delinquentPledgers () %> -
Date Description Amount Last modified Participants
<% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %> <% #stamp trn %>
<% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %> <% #stamp trn %><% name %>multi
+
<% foreach dq in dqs do %> @@ -670,7 +670,7 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI

Apply Stripe Payments

-
Member Pledge Balance
<% #name dq %> <% #shares dq %> $<% #balance dq %>
+
@@ -681,7 +681,7 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI +
DateMember Name on Card Amount (After Fees)<% #name (Init.lookupUser (#webuser_id stripePmt)) %> <% #paid_on stripePmt %> <% #card_name stripePmt %> - $<% #net stripePmt %>$<% #net stripePmt %>
@@ -696,10 +696,10 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI - +
<% foreach trn in Money.listTransactionsLimit 20 do %> - + <% switch Money.listChargesWithNames (#id trn) of [(name, cha)] => %><% | _ => %><% @@ -726,13 +726,13 @@ val trans = iff lookback = 0 then Money.listUserTransactions (Init.getUserId ()) else Money.listUserTransactionsLimit (Init.getUserId (), lookback) %> -
Date Description Amount Participants Replace Delete
<% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %>
<% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %><% name %>multi
+
<% foreach (amount, trn) in trans do %> - - - + + + <% running := Util.sub (running, amount) end %>
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 Util.lt (amount, 0.0) then %><% amount %><% end %><% if Util.ge (amount, 0.0) then %><% amount %><% end %><% running %>