# req-specs - Requirement Specifications for the `tkcheck' project. # # Written by Curtis Olson. Started August 19, 1994. # # $Id: req-specs,v 1.1.1.1 1999/12/18 02:05:30 curt Exp $ `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)