# req-specs - Requirement Specifications for the `tkcheck' project.
#
#	Written by Curtis Olson.  Started August 19, 1994.
#
# $Id: req-specs,v 1.5 1994/11/07 23:14:01 clolson Exp $
# (Log is kept at end of this file)


`tkcheck' -- a check balancing program written in perl/tk

This program is intended to mimic the functionality of commercial
check balancing programs.  It is intended to be simple to use, extensible,
adequately fast, easy to modify, etc. etc.

Note: this document is subject to change.


Overall Program Design and Philosophy
-------------------------------------
This program will be based upon the concept of a transaction.  A transaction
is simply a record which details any subtraction or addition to the account.

Conceptually the program will consist of three main parts.  

    The Transaction abstract data type -- a list of transaction records and
    the functions needed to manipulate those records.

    A Transaction Editor -- this simply provides a convenient means for
    editing transactions.

    Reports -- for those who like printed hard copies, summaries, and 
    other such things.

In addition to these three major components, there will be code to:

    Balance -- provide a convenient way to clear transactions and make sure 
    everything matches your bank statement.

    Procedure:
	Remember the previous account closing balance.  This is the current
	opening account balance.

	Prompt for current account closing balance.

	Build a list of uncleared transactions.

	Allow user to check off cleared transactions.  (showing updated
	totals.)

	When use clears done, all checked items are cleared.

    A Split Editor -- provides a convenient way to edit splits.  Splits
    simply allow partial values of a transaction to be assigned to different
    categories.

    A Category Editor -- provide a convenient way to edit categories.


Now (call me old fashioned but) we need a good transaction abstract data
type.


TRANSACTION
-----------
    This is the basic data type around which the whole program revolves.
    Note internally these will be represented by a single lines with the
    fields delimited by <*>.  I know you may say WHAT! so help me out
    with a better delimiter then.

    - Key		[req] (Unique)	Char
    - Date		[req]		Date
    - Check #		[opt]		Integer
    - Description	[rec]		String
    - Debit Amount	[opt]		Float (2dps)
    - Credit Amount     [opt]		Float (2dps)
    - Category		[req]		String
    - Comment		[opt]		String
    - Cleared		[req]		3 state

x   - keyed_trans = create_trans(trans)
    - keyed_trans = create_xfer(trans)
x   - keyed_trans = update_trans(keyed_trans)
x   - delete_trans(key)
x   - keyed_trans = next_trans(key)
    - keyed_trans = prev_trans(key)
x   - keyed_trans = find_trans(key)
x   - int = get_current_index()
x   - keyed_trans = first_trans()
x   - series of keyed_trans = all_trans()
    - keyed_trans = last_trans()
x   - keyed_trans = first_uncleared_trans()
    - keyed_trans = last_uncleared_trans()
x   - keyed_trans = next_uncleared_trans()
    - keyed_trans = prev_uncleared_trans()
x   - keyed_trans = select_trans(key)
x   - keyed_trans = unselect_trans(key)
x   - clear_trans()
x   - init_trans()
x   - load_trans(file_name)
x   - import_qif(file_name)
x   - save_trans(file_name)
x   - calc_trans()


MEMORIZED TRANSACTIONS
----------------------
    These are basically transactions indexed by description.

    - rehash_mems()
    - trans = find_mem(desc)
    

SPLITS
------
    This allows the value of a single transaction to be split among several
    categories.

    This is not really a data type, but a series of these records (delimited
    with some appropriate character) will be inserted in the transaction 
    category field when a transaction has splits.

    - Category		[req]		String
    - Comment		[opt]		String
    - Amount		[req]		Float (2dps)


CATEGORIES
----------
    These are transaction type categories.  They are usable for sorting
    and reporting.

    - Category		[req]		String
    - Description	[req]		String
    - Tax Related	[req]		Boolean

    - init_cats()
    - cat = edit_cat(cat)
    - cat = insert_cat(cat)
    - delete_cat(cat)
    - cat = first_cat()
    - cat = next_cat()
    - cats= all_cats()
    - cat = find_cat(key)
    - load_cats(file_name)
    - save_cats(file_name)
    
    

# ----------------------------------------------------------------------------
# $Log: req-specs,v $
# Revision 1.5  1994/11/07  23:14:01  clolson
# Working on interactive category viewing/editing
#
# Revision 1.4  1994/11/04  19:33:02  clolson
# Added Transfers between Accounts.
#
# Revision 1.3  1994/10/17  13:21:32  curt
# Minor changes
#
# Revision 1.2  1994/10/13  22:08:59  clolson
# Worked on adding memorized transactions.
#
# Revision 1.1  1994/10/11  15:05:04  curt
# Official name is now cbb (for now)
#
# Revision 1.12  1994/10/07  13:58:29  clolson
# i
#
# Revision 1.11  1994/10/03  13:52:03  clolson
# Changes in cat functions definition
#
# Revision 1.10  1994/09/28  13:46:00  curt
# Small modification to categories section.
#
# Revision 1.9  1994/09/20  12:49:13  clolson
# Finished the uncleared transaction routines in engine.pl
#
# Revision 1.8  1994/09/02  03:33:42  curt
# Removed print_trans()
#
# Revision 1.7  1994/08/29  00:18:16  curt
# Changes to keep this doc consistent with the changing nature of this
# project :)
#
# Revision 1.6  1994/08/25  18:47:36  clolson
# Added a init_trans command.
#
# Revision 1.5  1994/08/25  02:09:00  clolson
# More work on .qif imports
#
# Revision 1.4  1994/08/24  02:37:14  curt
# Updated function definitions for transactions
#
# Revision 1.3  1994/08/23  04:14:40  curt
# Added functions to transaction data type.  Added verbiage/descriptions.
#
# Revision 1.2  1994/08/22  18:27:22  clolson
# First version done.
#
# Revision 1.1  1994/08/22  02:58:31  curt
# First part of requirement specifications
#
