On Wed, Dec 13, 2000 at 06:42:04AM +1000, Phillip J Shelton wrote:
> It is the smallest amount that this account can change by. GnuCash is
> now using a variation on rational numbers which have a numerator, the
> value, and a denominator, the damont.
This isn't right. Each of 'value' and 'damount' is a rational number
(the data type is gnc_numeric). The 'value' is the 'amount of the
account's Currency', and the damount is the 'amount of the split's
Security'. If your stock account has a currency of USD and a security
of IBM, and you buy 100 shares for 1000 dollars, the value is 1000 and
the damount is 100 (both expressed in suitable rational
representations).
> > cleared_balance money "
> > reconciled_balance money "
> > share_balance money "
> > share_cleared_balance money "
> > share_reconciled_balance money "
>
> Are not these balance's more correctly part of the account?
No. I seem to recall there's a discussion about balance caching going
on elsewhere. It's already being done, and this is where the running
balance is cached. See xaccAccountBeginEdit and xaccAccountCommitEdit
to see how/when cached balances are refreshed.
> A transaction is the unit that is entered in the ledger, and the splits
> are for which accounts are affected by the transaction. Others will
> have a better explanation I am sure.
Transactions aren't entered in the ledger. In fact, there's no global
way to get a list of transactions at all. Splits are the fundamental
unit of financial information. Each account has a list of splits
which are debits and credits to that account. Each split has a
pointer to a transaction, which has a list of all the splits that
point to it. The transaction must have splits whose debits and
credits are equal in order to be balanced.
The Gnucash engine source code is in src/engine ; check in particular
Transaction.c, Account.c, Group.c. The gnc-numeric structure and API
are in gnc-numeric.{c,h}. The gnucash.org web page has instructions
for how to get the Gnucash source code from CVS.
b.g.
_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel