edit/corect old and incorrect statements about how transactions work.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10191 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2004-07-10 14:57:59 +00:00
parent d184068f27
commit af15b1bfd8

View File

@ -42,25 +42,24 @@ be created as a shared library for use by other programs.
@section Introduction @section Introduction
Splits (@pxref{Splits}), or "Ledger Entries" are the fundamental Splits (@pxref{Splits}), or "Ledger Entries" are the fundamental
accounting units. Each Split consists of a quantity (number of dollar accounting units. Each Split consists of an amount (number of dollar
bills, number of shares, etc.), the value of that quantity expressed in bills, number of shares, etc.), the value of that amount expressed in
a (possibly) different currency than the quantity, a Memo, a pointer to a (possibly) different currency than the amount, a Memo, a pointer to
the parent Transaction, a pointer to the debited Account, a reconciled the parent Transaction, a pointer to the debited Account, a reconciled
flag and timestamp, an "Action" field, and a key-value frame which can flag and timestamp, an "Action" field, and a key-value frame which can
store arbitrary data (@pxref{Key-Value Pair Frames}). store arbitrary data (@pxref{Key-Value Pair Frames}).
Transactions (@pxref{Transactions}) embody the notion of "double entry" Transactions (@pxref{Transactions}) embody the notion of "double entry"
accounting. A Transaction consists of a date, a description, a number, a accounting. A Transaction consists of a date, a description, an ID number, a
list of one or more Splits, and a key-value frame. When double-entry list of one or more Splits, and a key-value frame. The transaction
rules are enforced, the total value of the splits is zero. Note that if also specifies the currency with which all of the splits will be
there is just one split, its value must be zero for double-entry valued. When double-entry rules are enforced, the total value of
accounting; this used to be used for storing prices, but with the advent the splits are zero. If there are only two splits,
of the Price DB, this is no longer the case. If there are two splits,
then the value of one must be positive, the other negative: this denotes then the value of one must be positive, the other negative: this denotes
that one account is debited, and another is credited by an equal that one account is debited, and another is credited by an equal
amount. Positive Split values are 'debits' and negative Split values are amount. By forcing the value of the splits to always 'add up' to
'credits'. Ensuring the Splits to 'add up' to zero causes a double-entry zero, we can gaurentee that the balances of the accounts are always
accounting system to always balance. correctly balanced.
The engine does not enforce double-entry accounting, but provides an API The engine does not enforce double-entry accounting, but provides an API
to enable user-code to find unbalanced transactions and 'repair' them so to enable user-code to find unbalanced transactions and 'repair' them so
@ -85,13 +84,10 @@ to an Account, then the Account must point to the Split, and vice-versa.
A Split can belong to at most one Account. Besides merely containing a A Split can belong to at most one Account. Besides merely containing a
list of Splits, the Account structure also give the Account a name, a list of Splits, the Account structure also give the Account a name, a
code number, description and notes fields, a key-value frame, a pointer code number, description and notes fields, a key-value frame, a pointer
to the currency that is used for all splits in this account, and a to the commodity that is used for all splits in this account. The
pointer to the "security" used for all splits in this account. The commodity can be the name of anything traded and tradable: a stock
"security" can be the name of a stock (e.g. "IBM", "McDonald's"), or (e.g. "IBM", "McDonald's"), a currency (e.g. "USD", "GBP"), or
another currency (e.g. "USD", "GBP"). The security is used during anything added to the commodity table.
Transaction balancing to enable trading between accounts denominated in
different currencies, or to, for example, move stocks from one Account
to another.
Accounts can be arranged in a hierarchical tree. The nodes of the tree Accounts can be arranged in a hierarchical tree. The nodes of the tree
are called "Account Groups" (@pxref{Account Groups}). By accounting are called "Account Groups" (@pxref{Account Groups}). By accounting