Update of /cvsroot/hcoop/portal In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv22320
Modified Files: money.mlt portal.mlt util.sig util.sml Log Message: Links to list all transactions; debit/credit columns Index: util.sml =================================================================== RCS file: /cvsroot/hcoop/portal/util.sml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** util.sml 18 Feb 2008 17:46:05 -0000 1.17 --- util.sml 15 Jul 2008 16:32:52 -0000 1.18 *************** *** 33,36 **** --- 33,39 ---- fun mult (r1, r2) = real r1 * r2 + fun lt (r1 : real, r2) = r1 < r2 + fun ge (r1 : real, r2) = r1 >= r2 + fun isIdent ch = Char.isLower ch orelse Char.isDigit ch orelse ch = #"-" Index: money.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/money.mlt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** money.mlt 15 Jul 2008 16:19:04 -0000 1.33 --- money.mlt 15 Jul 2008 16:32:51 -0000 1.34 *************** *** 664,668 **** <% else %> <a href="?audit=1">Switch to audit view</a><br> ! <% val lookback = case $"lookback" of "" => 20 | lb => Web.stoi lb; @payment [] %> --- 664,668 ---- <% else %> <a href="?audit=1">Switch to audit view</a><br> ! <% val lookback = case $"lookback" of "" => 20 | "inf" => 0 | lb => Web.stoi lb; @payment [] %> *************** *** 670,686 **** <form> ! Show <input name="lookback" size="5" value="<% lookback %>"> most recent transactions. <input type="submit" value="Show"> </form> ! <% ref running = showBal %> <table> ! <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Balance</b></td></tr> ! <% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), lookback) do %> ! <tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> <td><% running %></tr> <% running := Util.sub (running, amount) end %> </table> <% end --- 670,695 ---- <form> ! Show <input name="lookback" size="5" value="<% iff lookback = 0 then 20 else lookback %>"> most recent transactions. <input type="submit" value="Show"> </form> ! <% ref running = showBal; ! val trans = iff lookback = 0 then ! Money.listUserTransactions (Init.getUserId ()) ! else ! Money.listUserTransactionsLimit (Init.getUserId (), lookback) %> <table> ! <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Debit</b></td> <td><b>Credit</b></td> <td><b>Balance</b></td></tr> ! <% foreach (amount, trn) in trans do %> ! <tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> ! <td align="right"><% if Util.lt (amount, 0.0) then %><% amount %><% end %></td> ! <td align="right"><% if Util.ge (amount, 0.0) then %><% amount %><% end %></td> <td><% running %></tr> <% running := Util.sub (running, amount) end %> </table> + <% if lookback <> 0 then %> + <a href="?lookback=inf">Show all transactions</a><br> + <% end %> <% end Index: util.sig =================================================================== RCS file: /cvsroot/hcoop/portal/util.sig,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** util.sig 18 Feb 2008 17:46:05 -0000 1.14 --- util.sig 15 Jul 2008 16:32:52 -0000 1.15 *************** *** 19,22 **** --- 19,25 ---- val mult : int * real -> real + val lt : real * real -> bool + val ge : real * real -> bool + val validHost : string -> bool val validDomain : string -> bool Index: portal.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/portal.mlt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** portal.mlt 15 Jul 2008 16:19:04 -0000 1.21 --- portal.mlt 15 Jul 2008 16:32:52 -0000 1.22 *************** *** 18,21 **** --- 18,22 ---- end %> </table> + <a href="money?lookback=inf">Show all transactions</a><br> <b>Balance: $<% showBal %></b><br> <b>Deposit: $<% deposit %></b> (3 months of dues at the minimal <a href="pledge">pledge level</a>) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ hcoop-cvs mailing list hcoop-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hcoop-cvs