Update of /cvsroot/hcoop/portal/remind In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv29888
Modified Files: remind.sml Log Message: Fix low balance reminder script cut-off bug Index: remind.sml =================================================================== RCS file: /cvsroot/hcoop/portal/remind/remind.sml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** remind.sml 1 Mar 2008 19:30:52 -0000 1.10 --- remind.sml 10 May 2008 23:19:24 -0000 1.11 *************** *** 12,15 **** --- 12,17 ---- Real.fmt (StringCvt.FIX (SOME 2)) n + val basePerMonth = 5.0 + fun main _ = let *************** *** 27,32 **** val amount = C.realFromSql amount ! val perMonth = 900.0 * real shares / real totalShares ! val deposit = 900.0 / real totalShares * 3.0 val headsUp = deposit + perMonth * 2.0 in --- 29,34 ---- val amount = C.realFromSql amount ! val perMonth = basePerMonth * real shares ! val deposit = perMonth * 3.0 val headsUp = deposit + perMonth * 2.0 in *************** *** 76,82 **** write (printReal (headsUp - amount)); ! write "\n\nYour deposit requirement was calculated by dividing our total monthly expenses\n"; ! write "($900) by the sum of all members' pledge amounts and then multiplying by 3. That\n"; ! write "is, the amount covers a minimal share of three months' expenses.\n\n"; write "To make a payment, visit:\n"; --- 78,82 ---- write (printReal (headsUp - amount)); ! write "\n\nThe deposit requirement was calculated as three months of dues at $5/mo..\n\n"; write "To make a payment, visit:\n"; *************** *** 92,96 **** | 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 < 10"; C.close db; OS.Process.success --- 92,96 ---- | 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.close db; OS.Process.success ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ hcoop-cvs mailing list hcoop-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hcoop-cvs