Re: portfolio value?
Guil Barros <[email protected]> Mon, 13 Oct 2003 17:50:46 -0500
| Newsgroups | gmane.comp.horde.jonah |
|---|---|
| Message-ID | <[email protected]> |
No problem. I have the ejse db in the works and should have it done by the
morning... also looking at fixing the sorting problem with genie :) im hooked!
<<<<<<<begin
ala:/usr/local/horde-cvs/horde/jonah/lib# cvs diff -u Jonah.php
Index: Jonah.php
===================================================================
RCS file: /repository/jonah/lib/Jonah.php,v
retrieving revision 1.83
diff -u -r1.83 Jonah.php
--- Jonah.php 5 Oct 2003 15:48:53 -0000 1.83
+++ Jonah.php 13 Oct 2003 22:49:14 -0000
@@ -307,6 +307,7 @@
}
$i = 0;
+ $portfolioValue = 0;
foreach ($quotes as $symbol => $quote) {
$html .= '<tr class="item' . ($i % 2) . '"><td>';
$html .=
Horde::link(Util::addParameter(Horde::applicationUrl('stockchart.php'),
'ticker', $symbol),
@@ -340,10 +341,19 @@
$html .= '</td><td>';
if (!empty($counts[$symbol]) && !empty($quote['lastPrice'])) {
$html .= '$' . number_format($counts[$symbol] *
$quote['lastPrice'], 2);
+ $portfolioValue += ($counts[$symbol] * $quote['lastPrice']);
}
$html .= '</td></tr>';
$i++;
}
+ /**
+ * Print Portfolio Value from $portfolioValue.
+ */
+ $html .= '<tr class="item' . ($i %2) . '"><td><td><td>';
+ $html .= 'Portfolio Value:';
+ $html .= '<td><td><td>';
+ $html .= '$' . number_format($portfolioValue, 2);
+ $html .= '</td></td></td></td></td></td></tr>';
$html .= '</table>';
return $html;
>>>>>>end
-guil
Quoting Chuck Hagenbuch <[email protected]>:
> Quoting Guil Barros <[email protected]>:
>
> > here's the diff... how/what format do i send a patch in and where to?
>
> diff -u (or cvs diff -u, if you're working off of a CVS checkout), and
> sending
> it to this list is just fine.
>
> Thanks!
>
> -chuck
>
> --
> Charles Hagenbuch, <[email protected]>
> Born right the first time.
>
> --
> Jonah mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: [email protected]
>
--
Jonah mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
(unnamed)
(application/pgp-keys, 997 B) - not displayed