2005-11-01 21:32:36 -06:00
|
|
|
/** \page gnucashextension Proposed GnuCash Extensions
|
2001-08-07 18:36:04 -05:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section accountperiods Accounting Periods
|
|
|
|
|
2021-02-05 13:52:33 -06:00
|
|
|
Accounting periods are implemented by creating an object that
|
2001-08-07 18:36:04 -05:00
|
|
|
describes the accounting period, and then assigning every
|
|
|
|
transaction to at least one period.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\verbatim
|
2001-08-07 18:36:04 -05:00
|
|
|
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;
|
2005-11-01 21:32:36 -06:00
|
|
|
\endverbatim
|
2001-08-07 18:36:04 -05:00
|
|
|
|
|
|
|
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:
|
2005-11-01 21:32:36 -06:00
|
|
|
- crawl over all transactions and mark them as being part of this
|
2001-08-07 18:36:04 -05:00
|
|
|
accounting period (actually, new transactions should by default be
|
|
|
|
getting put into the currently open period...)
|
2005-11-01 21:32:36 -06:00
|
|
|
- find the equity account (what if there is more than one equity account
|
2001-08-07 18:36:04 -05:00
|
|
|
?? what if equity has sub-accounts ?? )
|
2005-11-01 21:32:36 -06:00
|
|
|
- transfer all income/expense to equity (shouldn't the equity account
|
2017-01-16 16:03:50 -06:00
|
|
|
match the income/expense hierarchy?)
|
2005-11-01 21:32:36 -06:00
|
|
|
- return a new account group with new opening balances ...
|
2001-08-07 18:36:04 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section transactionchanges Changes to Transaction Structure
|
2001-08-07 18:36:04 -05:00
|
|
|
|
|
|
|
Add an accounting period guid (see above).
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section splitchanges Changes to Journal Entry (Split) Structure
|
|
|
|
|
|
|
|
\subsection splitvoucher Voucher Reference
|
|
|
|
|
2001-08-07 18:36:04 -05:00
|
|
|
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.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section bankingchanges Additional Banking Info
|
2001-08-07 18:36:04 -05:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
*/
|