X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/d5f8418bc9167e9597c463175b38830ba17624b6..f2bab7c8c21cd0dde8c63b8450ce628ff654cb80:/money.mlt
diff --git a/money.mlt b/money.mlt
index 34002dd..d92969b 100644
--- a/money.mlt
+++ b/money.mlt
@@ -7,7 +7,7 @@ ref showNormal = true;
if $"hist" <> "" then
showNormal := false;
val id = Web.stoi ($"hist") %>
-
+
Date Description Amount
<% foreach (amount, trn) in Money.listUserTransactions id do %>
<% #d trn %> <% Web.html (#descr trn) %> <% amount %>/<% #amount trn %>
@@ -20,7 +20,7 @@ if $"hist" <> "" then
Transactions
-
+
+
+<% elseif $"cmd" = "primary" then
+ val admin = Group.inGroupName "money";
+ showNormal := false %>
+
+Primary Transactions
+
+
+ Date Description Amount Last modified Participants
+<% foreach (amt, trn) in Money.listUserTransactions (valOf (Init.userNameToId "hcoop")) do %>
+ <% #d trn %> <% Web.html (#descr trn) %> <% #amount trn %> <% #stamp trn %>
+<% switch Money.listChargesWithNames (#id trn) of
+ [(name, cha)] => %><% name %> <%
+ | _ => %>multi <%
+end;
+if admin then
+ %>[Bill] [Payment] [Other]
[Delete] <%
end
%> <%
@@ -41,13 +63,13 @@ end %>
Active Balances
-
+
<% foreach bal in Balance.listOwnedBalances () do %>
<% #name bal %> <% #amount bal %>
<% switch Balance.listBalanceUsers (#id bal) of
[] =>
| (user :: users) =>
- %><% Web.html (#name user) %> <%
+ %><% Web.html (#name user) %> [History] <%
foreach user in users do
%>, <% Web.html (#name user) %> <%
end
@@ -60,7 +82,7 @@ end %>
Retired Balances
-
+
<% foreach bal in Balance.listUnownedBalances () do %>
<% #name bal %> <% #amount bal %>
<% switch Balance.listBalanceUsers (#id bal) of
@@ -80,7 +102,7 @@ end %>
Negative Active Balances (<% length bals %>)
-
+
<% foreach bal in bals do %>
<% #name bal %> <% #amount bal %>
<% switch Balance.listBalanceUsers (#id bal) of
@@ -153,6 +175,58 @@ end %>
%>Hosting transaction modified.
+<% elseif $"cmd" = "bill" then
+ Group.requireGroupName "money";
+ showNormal := false %>
+
+New bill for the co-op
+
+
+<% elseif $"cmd" = "dues" then
+ Group.requireGroupName "money";
+ showNormal := false %>
+
+Monthly dues
+
+
+
+
+
+<% elseif $"cmd" = "dues2" then
+ Group.requireGroupName "money";
+ Money.billDues {descr = $"descr", base = Web.stor ($"base"), date = $"d"};
+
+ %>Dues debits added.
+
<% elseif $"cmd" = "even" then
Group.requireGroupName "money";
val id = Money.addTransaction ($"descr", Web.stor ($"amount"), $"d");
@@ -374,9 +488,6 @@ end %>
E-mail address: <% #email appl %>
<% switch #paypal appl of
SOME s => %> PayPal: <% s %>
- <% end;
- switch #checkout appl of
- SOME s => %> Google Checkout: <% s %>
<% end %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
@@ -402,6 +513,23 @@ end %>
(nil, nil) => %>No matches.<%
end
+elseif $"cmd" = "realname" then
+ showNormal := false;
+ val users = Init.searchRealName ($"rname");
+
+ switch users of
+ _ :: _ =>
+ %>Members
+
+ <% foreach user in users do %>
+ <% #name user %> [add payment]
+ <% end
+ end;
+
+ switch users of
+ nil => %>No matches.<%
+ end
+
elseif $"cmd" = "checkout" then
showNormal := false;
val apps = App.searchCheckout ($"email");
@@ -431,9 +559,6 @@ elseif $"cmd" = "checkout" then
E-mail address: <% #email appl %>
<% switch #paypal appl of
SOME s => %> PayPal: <% s %>
- <% end;
- switch #checkout appl of
- SOME s => %> Google Checkout: <% s %>
<% end %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
@@ -459,77 +584,191 @@ elseif $"cmd" = "checkout" then
(nil, nil) => %>No matches.<%
end
-end %>
+elseif $"cmd" = "delinq" then
+ showNormal := false;
+ val dqs = Money.delinquentPledgers () %>
+
+ Member Pledge Balance
+<% foreach dq in dqs do %>
+ <% #name dq %> <% #shares dq %> $<% #balance dq %>
+<% end %>
+
-<% if showNormal then %>
+ Int.toString (#id dq)) dqs) %>">Lower these pledges to 1
-Your balance: $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %>
-<% if (iff Group.inGroupName "money" then $"lookback" = "" else $"audit" <> "") then %>Sum of all active balances: $<% Balance.sumOwnedBalances () %> <% end %>
+<% elseif $"lower" <> "" then
+ Money.resetPledges (List.map Web.stoi (String.tokens (fn ch => ch = #",") ($"lower")))
+
+ %>Pledges reset. <%
+
+elseif $"cmd" = "freezeworthy" then
+ showNormal := false;
+ val dqs = Money.freezeworthyPledgers () %>
+
+ Member Balance
+<% foreach dq in dqs do %>
+ <% #name dq %> $<% #balance dq %>
+[History]
+<% if #joinedThisMonth dq then %>(joined this month) <% end %>
+<% end %>
+
+
+<% elseif $"cmd" = "bootworthy" then
+ showNormal := false;
+ val dqs = Money.bootworthyPledgers () %>
+
+ Member Balance
+<% foreach dq in dqs do %>
+ <% #name dq %> $<% #balance dq %> [History]
+<% if #joinedThisMonth dq then %>(joined this month) <% end %>
+<% end %>
+
+
+<% end %>
+<% if showNormal then
+ val you = Init.getUser();
+ val bal = Balance.lookupBalance (#bal you);
+ val deposit = Balance.depositAmount (#id bal);
+ val showBal = Util.sub (#amount bal, deposit) %>
+
+Your balance: $<% showBal %>
+Deposit: $<% deposit %> (3 months of dues at the minimal pledge level )
+
+
+<% if (iff Group.inGroupName "money" then $"lookback" = "" else $"audit" <> "") then %>Sum of all active balances: $<% Balance.sumOwnedBalances () %> <% end %>
+
+
+<% if (Group.inGroupName "money" and $"lookback" = "") or $"audit" <> "" then %>
+
+
+
+Apply Stripe Payments
+
+
Most recent transactions
-