/** \page gnucashextension Proposed GnuCash Extensions

The following are proposals for various, as-yet-unimplemented
enhancements.  The goal of this document is to understand some
of the changes that will come soon to the interfaces.

\section accountperiods Accounting Periods

Accounting periods are implemented by creating an object that
describes the accounting period, and then assigning every 
transaction to at least one period.

\verbatim
typedef struct _accountingPeriod {
        GUID guid;           // id
	char *name;          // user-selectable name
	int kind;            // enum {none, week, month, quarter, year }
	Timespec * start_date;   //
	Timespec * end_date;
        AccountGroup  *topgrp;  // chart of accounts for this period.
} AccountingPeriod;
\endverbatim

The Transaction struct has to be extended with a period guid.
Every transaction can belong to at most one accounting period.

In addition, each chart of accounts needs to be extended with 
an accounting period as well.  This allows 'old' accounts to be deleted
from 'open books', without having to delete that same account from old
closed books.  Basically, a new chart of accounts needs to be written
out/read from the engine for each new accounting period.

The xaccPeriodClose() subroutine performs the following:
- crawl over all transactions and mark them as being part of this
   accounting period (actually, new transactions should by default be
   getting put into the currently open period...)
- find the equity account (what if there is more than one equity account
   ?? what if equity has sub-accounts ?? )
- transfer all income/expense to equity  (shouldn't the equity account
   match the income/expense hierarchy?)
- return a new account group with new opening balances ...

\section transactionchanges Changes to Transaction Structure

Add an accounting period guid (see above).

\section splitchanges Changes to Journal Entry (Split) Structure

\subsection splitvoucher Voucher Reference

Add a char * voucher;  This is a generic id string that somehow
identifies the piece of paper/electronic document(s) that indicate
where/how to find the paper trial for this entry.   This list of id's
should probably be a list of key-value pairs, where the keys & values
can be completely configured by the user, and hold the needed data
that the user wants to store.  For the SQL backend, this is a key
to a user-definable table.

\section bankingchanges Additional Banking Info

BankId -- routing & transit number (US) or Bankleitzan (DE) or Banque (FR)
BranchID -- Agence (FR), blank for other countries

AcctKey -- Cle (FR), blank in others

Account type enumerants:
bank account types:
    checking, savings, moneymarket, creditline, cma (cash amangement account)

*/
