incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r834759 - in /incubator/stonehenge/trunk/stocktrader/php/trader_client: portfolio.php quotes.php
Date Wed, 11 Nov 2009 04:31:38 GMT
Author: bendewey
Date: Wed Nov 11 04:31:38 2009
New Revision: 834759

URL: http://svn.apache.org/viewvc?rev=834759&view=rev
Log:
STONEHENGE-61, part2, added number_format to the total row and quotes page.

Modified:
    incubator/stonehenge/trunk/stocktrader/php/trader_client/portfolio.php
    incubator/stonehenge/trunk/stocktrader/php/trader_client/quotes.php

Modified: incubator/stonehenge/trunk/stocktrader/php/trader_client/portfolio.php
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/php/trader_client/portfolio.php?rev=834759&r1=834758&r2=834759&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/php/trader_client/portfolio.php (original)
+++ incubator/stonehenge/trunk/stocktrader/php/trader_client/portfolio.php Wed Nov 11 04:31:38
2009
@@ -174,11 +174,11 @@
 					$gain = $marketValue - $purchaseBasis;
 					if ($gain < 0)
 					{
-						print ("<span class=\"price-loss\">$".$gain."</span></td><td></td></tr>");
+						print ("<span class=\"price-loss\">$".number_format($gain, 2)."</span></td><td></td></tr>");
 					}
 					else if ($gain > 0)
 					{
-						print ("<span class=\"price-gain\">$".$gain."</span></td><td></td></tr>");
+						print ("<span class=\"price-gain\">$".number_format($gain, 2)."</span></td><td></td></tr>");
 					}		
 					else
 					{

Modified: incubator/stonehenge/trunk/stocktrader/php/trader_client/quotes.php
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/php/trader_client/quotes.php?rev=834759&r1=834758&r2=834759&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/php/trader_client/quotes.php (original)
+++ incubator/stonehenge/trunk/stocktrader/php/trader_client/quotes.php Wed Nov 11 04:31:38
2009
@@ -208,11 +208,11 @@
 
 						if ($quotesReturn->change > 0)
 						{
-							print ("<span class=\"price-gain\">$".$quotesReturn->change."</span>");
+							print ("<span class=\"price-gain\">$".number_format($quotesReturn->change,
2)."</span>");
 						}
 						else if ($quotesReturn->change < 0)
 						{
-							print ("<span class=\"price-loss\">$".$quotesReturn->change."</span>");
+							print ("<span class=\"price-loss\">$".number_format($quotesReturn->change,
2)."</span>");
 						}
 						else
 						{
@@ -254,11 +254,11 @@
 
 								if ($quotesReturn->change > 0)
 								{
-									print ("<span class=\"price-gain\">$".$quotesReturn->change."</span>");
+									print ("<span class=\"price-gain\">$".number_format($quotesReturn->change,
2)."</span>");
 								}
 								else if ($quotesReturn->change < 0)
 								{
-									print ("<span class=\"price-loss\">$".$quotesReturn->change."</span>");
+									print ("<span class=\"price-loss\">$".number_format($quotesReturn->change,
2)."</span>");
 								}
 								else
 								{



Mime
View raw message