From a6b661445fa279090685ebc3dd764b11572586e3 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Fri, 19 May 2000 07:12:19 +0000 Subject: [PATCH] added notes abut accounting periods git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2354 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/extensions.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/engine/extensions.txt b/src/engine/extensions.txt index c025dfa615..652bab01b9 100644 --- a/src/engine/extensions.txt +++ b/src/engine/extensions.txt @@ -7,16 +7,17 @@ of the changes that will come soon to the interfaces. Accounting Periods ------------------ -Acconting periods are implemented by creating a structure that -describes the accounting period, and then assigning every traansaction to -at least one period. +Acconting periods are implemented by creating an object that +describes the accounting period, and then assigning every +transaction to at least one period. typedef struct _accountingPeriod { GUID guid; // id char *name; // user-selectable name int kind; // enum {none, week, month, quarter, year } - start_date; // - end_date; + Timespec * start_date; // + Timespec * end_date; + AccountGroup *topgrp; // chart of accounts for this period. } AccountingPeriod; The Transaction struct has to be extended with a period guid. @@ -29,6 +30,17 @@ 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 heirarchy?) +-- return a new account group with new opening balances ... + + Changes to Transaction Structure --------------------------------