html-utilities.scm

linas@linas.org linas@linas.org
Sat, 3 Mar 2001 17:26:52 -0600 (CST)


It's been rumoured that Christian Stimming said:
> 
> (instead of "only" code conflicts).

Well, I'm glad I asked. I assumed that report was just 'broken',
so I was going to 'fix it'.

I've appended below the sample html output for a 3-stock trading 
account (an update of one of the very old defaults samples).

-- a listing for 'THJ', and every other stock, appears 3 times: top,
   middle, and bottom.  That's too many.

-- the foreign amount should be in cells that are left-aligned;
   they are hard to read when right aligned.

-- The belance is reported as 0.0 at the lowest level, followed 
   by a line with the correct balance in shares of stock and in the
   reporting currency.

-- subtotals should be underlined, and should appear at the bottom, not
   the top.

Those are the 'obvious' problems.   The first problm is particularly
bad: if you have several dozen stocks, then the report becomes very 
long and confusing.  It took me a long while to understand what I was
looking at. 

What I'd like to have it do is to show the balances in the shares of
stock, and the reporting curency, only for the sub-accounts that 
are stocks.  Then, a separate report, maybe tacked on to the bottom,
should show the most recent exchange rate/price, and the date of that
price.

To make it do what you want, I suspect we need to distinguish
'currency' accounts, and 'stock' accounts.


--linas

p.s. the 'export' button on the report now works. Fixed that last night.
That's how I got the html out.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/0.8">
</HEAD>
<BODY BGCOLOR="#ffffff"><h3>Account Summary</h3>
<TABLE CELLSPACING="1">
<TR>
<TD>
<FONT SIZE=3><B>Account name</B></FONT SIZE=3></TD>
<TD>
<div align=right>
<FONT SIZE=3><B>Balance</B></FONT SIZE=3></div>
</TD>
</TR>
<TR>
<TD>
<A HREF="gnc-register:account=Swipe Trading Account">Swipe Trading Account</A></TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
$1,291.47</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
THJ 50</div>
</TD>
<TD>
<div align=right>
$581.00</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
SHRT 0</div>
</TD>
<TD>
<div align=right>
$</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
HAL 50</div>
</TD>
<TD>
<div align=right>
$100.00</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
<A HREF="gnc-register:account=Swipe Trading Account:HAL Stock">HAL Stock</A></TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
$0.00</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
HAL 50</div>
</TD>
<TD>
<div align=right>
$100.00</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
<A HREF="gnc-register:account=Swipe Trading Account:SHRT Stock">SHRT Stock</A></TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
$0.00</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
SHRT 0</div>
</TD>
<TD>
<div align=right>
$</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
<A HREF="gnc-register:account=Swipe Trading Account:THJ Stock">THJ Stock</A></TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
$0.00</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
THJ 50</div>
</TD>
<TD>
<div align=right>
$581.00</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
</TR>
<TR>
<TD>
Net Assets</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
$1,291.47</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
HAL 50</div>
</TD>
<TD>
<div align=right>
$100.00</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
SHRT 0</div>
</TD>
<TD>
<div align=right>
$</div>
</TD>
</TR>
<TR>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
&nbsp;</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
&nbsp;</div>
</TD>
<TD>
<div align=right>
THJ 50</div>
</TD>
<TD>
<div align=right>
$581.00</div>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>