
Design Quickie Overview
-----------------------
by Linas Vepstas, August 2001

Files
-----
Project data is pretty-much isolated from the rest of the 
code, in the proj.c file.  The structures are not visible,
and are kept private, in proj_p.h.  This should allow the
project data to be more easily interfaced to things like SQL
databases.  The structures are also GUI (gtk/gnome) independent,
which should also allow them to be used inside of e.g. cgi-bins.

Project data is saved in an XML file format: see
xml-read.c and xml-write.c

Journals are displayed as html by the gtkhtml widget.  The
generation of the html output has been abstracted so that
it could be piped to anything (e.g. to a cgi-bin).


All About Billing
-----------------
There are four supported billing rates: rgular, overtime,
double-overtime and flat-rate.  The dollar values for these are stored
in the project structure.   Which of these to use is an enum associated
with a task.   'flat_rate' is what it sounds like: the amount to bill
for the task, independent of the actual time spent.

Tasks can also be classed as billable or not in four ways:
billable -- go ahead an bill for this.
free of charge -- print on invoice but price is zero
not billable -- do not print on invoice.
hold -- potentially billable, but still being edited for correctness.

Tasks have a bill unit: everything on the bill will appear as a 
multiple of this value.  Typically 15 minutes or an hour.  Interval
totals less than this are rounded up to a bill unit.


Interval Fuzz
-------------
If users ned to hand-enter ex-post-facto hours into gtt, they may not 
exactly remember the exact start time, down to the exact second.  
Thier memory is fuzzy.  The interval 'fuzz' is used to indicate
how uncertain the start time is.  Typically, its 0, 300, 900 or 3600
seconds.  If set to 12*3600, it just means "I did this work sometime
today", but is otherwise vague about when.  (So, for example, in this
case, the start time should be understood to indicate a day, but not
a time.)

Just because the fuzz is set doesn't mean that the interval is
inaccurate.  Its still assumed that the interval is correct down to the
last second.  


Notes vs. Memos:
----------------
Memo's are meant to be printed on invoices, whereas notes are meant to
be kept internal, not shown to the customer.


Custid
------
Customer id.   Not used at the moment, future hook for customer
name/address/vcard,etc. info for invoicing.
