payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / money.mlt
index 63bfe0d..d92969b 100644 (file)
--- a/money.mlt
+++ b/money.mlt
@@ -63,7 +63,7 @@ end %>
 
 <h3>Active Balances</h3>
 
-<table>
+<table class="data">
 <% foreach bal in Balance.listOwnedBalances () do %>
 <tr><td><% #name bal %></td> <td><% #amount bal %></td> <td>
 <% switch Balance.listBalanceUsers (#id bal) of
@@ -82,7 +82,7 @@ end %></td> </tr>
 
 <h3>Retired Balances</h3>
 
-<table>
+<table class="data">
 <% foreach bal in Balance.listUnownedBalances () do %>
 <tr><td><% #name bal %></td> <td><% #amount bal %></td> <td>
 <% switch Balance.listBalanceUsers (#id bal) of
@@ -102,7 +102,7 @@ end %></td> </tr>
 
 <h3>Negative Active Balances (<% length bals %>)</h3>
 
-<table>
+<table class="data">
 <% foreach bal in bals do %>
 <tr><td><% #name bal %></td> <td><% #amount bal %></td> <td>
 <% switch Balance.listBalanceUsers (#id bal) of
@@ -258,7 +258,6 @@ end %></textarea></td> </tr>
 <table class="blanks">
 <tr> <td>Description:</td> <td><select name="descr">
        <option<% if $"checkout" = "" then %> selected<% end %>>PayPal</option>
-       <option<% if $"checkout" <> "" then %> selected<% end %>>Google Checkout</option>
        <option>Check</option>
        <option>Direct transfer</option>
        <option value="">Other:</option>
@@ -298,7 +297,7 @@ end %></textarea></td> </tr>
         showNormal := false;
 %>
 <h3>Are you sure you want to reject Stripe Payment <% $"stripeChargeId" %>?</h3>
-<form method="post" action="/stripe/stripe-payment.cgi">
+<form method="post" action="/stripe/stripe-admin.cgi">
         <input type="hidden" name="cmd" value="reject_member_payment" />
         <input type="hidden" name="stripeChargeId" value="<% $"stripeChargeId" %>" />
        <label>Reason for rejection <input type="text" name="reason" /></label>
@@ -489,9 +488,6 @@ end %>
        <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
        <% switch #paypal appl of
          SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
-       <% end;
-       switch #checkout appl of
-         SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
        <% end %>
        <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
        <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
@@ -563,9 +559,6 @@ elseif $"cmd" = "checkout" then
        <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
        <% switch #paypal appl of
          SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
-       <% end;
-       switch #checkout appl of
-         SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
        <% end %>
        <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
        <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
@@ -611,10 +604,11 @@ elseif $"cmd" = "delinq" then
 elseif $"cmd" = "freezeworthy" then
        showNormal := false;
        val dqs = Money.freezeworthyPledgers () %>
-<table>
+<table class="data">
 <tr> <th>Member</th> <th>Balance</th> </tr>
 <% foreach dq in dqs do %>
-<tr> <td><a href="user?id=<% #id dq %>"><% #name dq %></a></td> <td>$<% #balance dq %></td>
+<tr> <td><a href="user?id=<% #id dq %>"><% #name dq %></a></td> <td style="text-align: right">$<% #balance dq %></td>
+<td><a href="money?hist=<% #id dq %>">[History]</a></td>
 <% if #joinedThisMonth dq then %><td><i>(joined this month)</i></td><% end %></tr>
 <% end %>
 </table>
@@ -622,10 +616,10 @@ elseif $"cmd" = "freezeworthy" then
 <% elseif $"cmd" = "bootworthy" then
        showNormal := false;
        val dqs = Money.bootworthyPledgers () %>
-<table>
+<table class="data">
 <tr> <th>Member</th> <th>Balance</th> </tr>
 <% foreach dq in dqs do %>
-<tr> <td><a href="user?id=<% #id dq %>"><% #name dq %></a></td> <td>$<% #balance dq %></td>
+<tr> <td><a href="user?id=<% #id dq %>"><% #name dq %></a></td> <td style="text-align: right">$<% #balance dq %></td><td><a href="money?hist=<% #id dq %>">[History]</a></td>
 <% if #joinedThisMonth dq then %><td><i>(joined this month)</i></td><% end %></tr>
 <% end %>
 </table>
@@ -639,13 +633,10 @@ elseif $"cmd" = "freezeworthy" then
    val showBal = Util.sub (#amount bal, deposit) %>
 
 <h3>Your balance: $<% showBal %><br>
-Deposit: $<% deposit %></b> (3 months of dues at the minimal <a href="pledge">pledge level</a>)<br>
-Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToId "hcoop"))) %></h3>
-
-<!--h3>Your balance: $<% #amount bal %></h3-->
+Deposit: $<% deposit %> (3 months of dues at the minimal <a href="pledge">pledge level</a>)<br>
+<!--Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToId "hcoop"))) %>--></h3>
 
 <% if (iff Group.inGroupName "money" then $"lookback" = "" else $"audit" <> "") then %><h3>Sum of all active balances: $<% Balance.sumOwnedBalances () %></h3><% end %>
-<div>
 <div class="payment-tile">
   <h3>Financial Information</h3>
 <a href="money?cmd=list">List all transactions</a><br>
@@ -660,7 +651,11 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI
 
 <a href="?cmd=delinq">Drop pledges of delinquent members</a><br>
 <a href="?lookback=20">Switch to regular member view</a><br>
+
+<% end %>
 </div>
+
+<% if (Group.inGroupName "money" and $"lookback" = "") or $"audit" <> "" then %>
 <div class="payment-tile">
   <h3>New Transaction</h3>
 <a href="money?cmd=bill">Bill for the co-op</a><br>
@@ -669,9 +664,10 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI
 <a href="money?cmd=hosting">New hosting bill (old style)</a><br>
 <a href="money?cmd=evenForm">Generic/even</a><br>
 <br>
-<a href="money?cmd=equalize">Equalize balances</a><br>
+<!-- <a href="money?cmd=equalize">Equalize balances</a><br> -->
 <br>
 </div>
+
 <div>
 <div class="payment-tile">
 <h3>Look up a PayPal e-mail address</h3>
@@ -741,7 +737,10 @@ end %>
 </table>
 
 <% else %>
+<div class="payment-tile">
+<p>
 <a href="?audit=1">Switch to audit view</a><br>
+</p></div>
 <% val lookback = case $"lookback" of "" => 20 | "inf" => 0 | lb => Web.stoi lb;
    @payment [] %>