Understanding the Business objects

Rich Johnson rjohnson at dogstar-interactive.com
Wed Dec 1 17:09:18 EST 2004


For better or worse, the following is a summary of how I currently 
understand the business objects.  Hopefully I'm on the right track.  
Please correct any misunderstandings I might have:

gncOwner is a weak reference to an _external_ entity.

gncCustomer
gncVendor
gncEmployee  describe _external_ entities and the billing and payment 
policies which apply.

gncJob is an alias for either a gncCustomer or a gncVendor.  There is a 
1->n relationship between these two objects.  A 'customer job' is 
represented by a gncJob with a gncCustomer owner and be used in lieu of 
a gncCustomer.  A 'vendor job' is represented by a gncJob with a 
gncVendor owner and may be used in lieu of a gncVendor.  A gncJob 
referencing a gncEmployee is nonsensical.

gncAddress
gncBillTerm
gncTaxTable are used to describe _external_ entities and the billing 
and payment policies.

gncInvoice is either an invoice, bill or expense report, depending on 
the gncOwner and accounts involved.  An 'invoice' has either a 
gncCustomer or 'customer job' as an 'owner' and posts to Accounts 
Receivable.  A 'bill' has either a gncVendor or 'vendor job' as its 
'owner' and posts to Accounts Payable.  An 'expense report' has a 
gncEmployee as it's 'owner' and posts to Accounts Payable.

gncEntry represents a line item on an invoice.  There is an n->1 
relationship between gncEntry and gncInvoice.  There is a 1->1 
relationship between a gncEntry and an income or expense account(  
depending on context ).   Furthermore, entries on a 'bill' or 'expense 
report' may be 'owned' by a gncCustomer or 'customer job'.  I assume 
such expenses will show up on a subsequent invoice.

There appears to be no separate 'payment' object explicitly applying 
payments against open invoices.  Payments received will be split across 
open invoices in an indeterminate manner--to me it looks like this 
happens to be FIFO order as it is in the reverse order they're 
encountered when the DB is scanned (engine/Account.c#1983) while the 
invoices are inserted in LIFO order (engine/Account.c#816)



More information about the gnucash-devel mailing list