scheduled transactions

David Merrill david@lupercalia.net
Fri, 2 Feb 2001 09:05:26 -0500


On Thu, Feb 01, 2001 at 12:49:48AM -0800, Joshua Sled wrote:
> I've been focusing recently on scheduled transactions, since that's what
> people more seem to want [more than budgeting], and the budgeting stuff
> should make use of a seperable scheduled-transaction subsystem.  My hope
> is that soon/eventually, someone else will finish/polish/maintain the
> scheduled transaction stuff while I focus on budgeting...
> 
> In any case, this is what I'm thinking...  feedback, esp. about the hacky
> "date-anchor" structure, is appreciated.  It's expected that there will
> be some set of functions like findComeDueTransactionsSince(time_t) and
> isSXactionDueOnDate( ScheduledTransaction, time_t ) used to deal with
> the Frequency structure...

I have taken a somewhat different approach to storing this data in the
database. I use a more generic but more flexible storage mechanism:

- run once
- every n days
- every n weeks (1 or 2 days in 0-6 range)
- every n months (1 or 2 dates in 1-31 range)
- annually

See http://www.lupercalia.net/gnc-db/schedule.txt for more, and of
course http://www.lupercalia.net/gnc-db/schema.sql for the table
structure.

It seems your structure is more complex by trying to fit specific
circumstances with special codes that can be accomodated by a single,
more flexible structure.

With my table, you store quarterly payments as "every 3 months" and
annual as "every 12 months". The user interface can of course be more
friendly than this. :-)

Sorry for not speaking up about this earlier - I have been very busy
with another project!

-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                   david@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

Have you reconsidered a computer career?