Fold dues increase into portal
[bpt/portal.git] / remind / remind.sml
index 8c5c459..d3e3b8b 100644 (file)
@@ -11,7 +11,7 @@ fun printReal n =
     else
        Real.fmt (StringCvt.FIX (SOME 2)) n
 
-val basePerMonth = 5.0
+val basePerMonth = 7.0
 val deposit = basePerMonth * 3.0
 
 fun main _ =
@@ -77,7 +77,7 @@ fun main _ =
                        write "\nMinimum amount to pay to not see this message again for two months: US$";
                        write (printReal (headsUp - amount));
 
-                       write "\n\nThe deposit requirement was calculated as three months of dues at $5/mo..\n\n";
+                       write "\n\nThe deposit requirement was calculated as three months of dues at $7/mo..\n\n";
 
                        write "To make a payment, visit:\n";
                        write "     https://members.hcoop.net/\n";
@@ -91,7 +91,7 @@ fun main _ =
            end
          | doOne _ = raise Fail "Bad SQL row"
     in
-       C.app db doOne ("SELECT Balance.name, COUNT(*), SUM(WebUserPaying.shares) AS shrs, Balance.amount FROM WebUserPaying JOIN Balance ON WebUserPaying.bal = Balance.id GROUP BY Balance.name, Balance.amount HAVING amount < " ^ C.realToSql (basePerMonth * 5.0) ^ " * SUM(WebUserPaying.shares)");
+       C.app db doOne ("SELECT Balance.name, COUNT(*), SUM(WebUserPaying.shares) AS shrs, Balance.amount FROM WebUserPaying JOIN Balance ON WebUserPaying.bal = Balance.id GROUP BY Balance.name, Balance.amount HAVING amount < " ^ C.realToSql deposit ^ " + " ^ C.realToSql (basePerMonth * 2.0) ^ " * SUM(WebUserPaying.shares)");
        C.close db;
        OS.Process.success
     end handle C.Sql s => (print ("SQL failure: " ^ s ^ "\n");