X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/104fbeb69b4ef3d77090a403b1a6d3c2681c578c..44a63d224a81da3c5d2c9e50a46b6af956c47c5f:/money.mlt
diff --git a/money.mlt b/money.mlt
index 4654b06..e846c3f 100644
--- a/money.mlt
+++ b/money.mlt
@@ -285,6 +285,11 @@ end %>
%>
Payment transaction added.
+<% elseif $"cmd" = "stripeApply" then
+ val stripePmt = Money.lookupStripePayment ($"stripeId");
+ val txid = Money.applyStripePayment stripePmt;
+%>Stripe Payment Processed (Transaction <% txid %>)
+
<% elseif $"modPay" <> "" then
Group.requireGroupName "money";
showNormal := false;
@@ -339,6 +344,27 @@ end %>
+<% elseif $"cmd" = "dues" then
+ Group.requireGroupName "money";
+ showNormal := false %>
+
+Monthly dues
+
+
-Look up a Google Checkout e-mail address
+Look up a Real Name
+Apply Stripe Payments
+
+
+Date | Member |
+ Name on Card |
+ Amount (After Fees) | | |
+
+<% foreach stripePmt in Money.listAllPendingStripePayments () do %>
+
+
+ <% #name (Init.lookupUser (#webuser_id stripePmt)) %> |
+ <% #paid_on stripePmt %> |
+ <% #card_name stripePmt %>
+ | $<% #net stripePmt %> |
+
+ |
+
+<% end %>
+
+
Most recent transactions
+
+
Date | Description | Amount | Participants | Replace | Delete |
<% foreach trn in Money.listTransactionsLimit 20 do %>
@@ -637,22 +711,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 %>