GDA: Lots and splits

Phil Longstaff plongstaff at rogers.com
Wed Nov 22 09:36:51 EST 2006


I am working on saving and restoring lots.  I know they are used in the
business backend to match an invoice with a payment and in stock/mutual
fund accounts to match purchases and sales.  Any other places?

Internally, a split has a pointer to the lot it is a member of, and a
lot has a glist of splits.  I haven't seen a query for lots so GC must
just assume that they are loaded when splits are.  Thus, when the GDA
backend receives a query for splits associated with an account, besides
needing to load the transactions associated with those splits and all of
the splits associated with those transactions, it needs to load the lots
associated with the splits (but just the original splits associated with
the account).  I assume there is no need to load other lots associated
with the other splits associated with the transactions (and the splits
associated with them, and the transactions, and the other splits
and ...).  Note that this is one more use of special-casing the query
for splits.

Phil



More information about the gnucash-devel mailing list