2005-11-01 21:32:36 -06:00
|
|
|
/** \page business1 Business Overview
|
2003-10-12 13:00:45 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
API: \ref Business
|
2003-10-22 08:56:20 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section businessoverview Business Objects
|
|
|
|
|
|
|
|
The GnuCash Business objects, in src/business/business-core, implement
|
2003-10-22 08:56:20 -05:00
|
|
|
certain basic small-business accounting functions. Below follows a summary
|
|
|
|
overview of the objects and the data that they store. These are listed in
|
|
|
|
order of complexity; with the basic building blocks first, and the more
|
|
|
|
complex structures last.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\subsection address Address:
|
2003-10-22 08:56:20 -05:00
|
|
|
A very simple object, stores strings for name/street-address/phone/fax/email
|
|
|
|
The address is not a separate entity, but is meant to be embedded in other
|
|
|
|
objects (that is, there is no addressbook; there is no address database that
|
|
|
|
is separate from the objects that use addresses; there is no 'foreach'
|
|
|
|
that can be used to iterate over all addresses.)
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
API: \ref Address
|
|
|
|
|
|
|
|
\subsection billterm BillTerm:
|
2003-10-22 08:56:20 -05:00
|
|
|
Describes billing terms, that is when a bill is due, and what sort of a
|
|
|
|
discount is applied (if any). The BillTerm object currently supports:
|
|
|
|
-- the discount applied to a bill (absolute numeric value),
|
|
|
|
-- the number of days until payment is due,
|
|
|
|
-- the number of days until a discount expires.
|
|
|
|
-- cutoff ??
|
|
|
|
The proximo type does what ???
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
API: \ref BillTerm
|
2003-10-22 08:56:20 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\subsection entry Entry:
|
2003-10-22 08:56:20 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\subsection invoice Invoice:
|
2021-02-05 13:52:33 -06:00
|
|
|
Pulls together info needed to generate an invoice, including addresses,
|
2003-10-22 08:56:20 -05:00
|
|
|
job, the dates, the billing terms, the amounts, and the accounts
|
|
|
|
to be credited.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
API: \ref Entry
|
2003-10-22 08:56:20 -05:00
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
\section bus_design Business Design & Implementation Notes
|
2003-10-22 08:56:20 -05:00
|
|
|
|
2003-10-12 13:01:36 -05:00
|
|
|
Derek Atkins <warlord@mit.edu>
|
2003-10-12 13:00:45 -05:00
|
|
|
Version of October 2003
|
|
|
|
|
|
|
|
The gncTaxTable and gncBillTerm business objects have parent, child,
|
2021-02-05 13:52:33 -06:00
|
|
|
refcount, invisible field in their structures that deserve some
|
2003-10-12 13:00:45 -05:00
|
|
|
explanation:
|
|
|
|
|
|
|
|
- a child is a 'frozen' instance of a parent. For example, the tax
|
|
|
|
percentage in a particular tax table may change over time, but you
|
|
|
|
dont want that change to affect already-posted invoices... So you
|
|
|
|
make sure there is an immutable 'copy' (read: child) of the tax
|
|
|
|
table when you post the invoice and repoint at the child.
|
|
|
|
|
|
|
|
- a parent can have many children, but it will only have a 'child'
|
|
|
|
pointer if the parent has not been modified. Think of this as a
|
|
|
|
copy-on-write mechanism. posted invoices will continue to use the
|
|
|
|
_same_ child until the parent is modified, at which point a new
|
|
|
|
child will be created.
|
|
|
|
|
|
|
|
- invisible means "dont show this in the list". It's so you dont
|
|
|
|
get all the children in the tax table list -- you only see parents.
|
|
|
|
I suppose this flag could also be called "is-child" as I believe that
|
|
|
|
only children can be invisible, and ALL children are invisible.
|
|
|
|
|
|
|
|
- refcount is a listing of how many objects are referencing it.
|
|
|
|
Basically, it's letting you know how many customer, vendor, entries,
|
|
|
|
etc are referencing e.g. a particular tax table object. mostly this
|
|
|
|
was done to make sure you cannot delete an in-use taxtable.
|
|
|
|
|
|
|
|
- children don't use refcounts, only parents do.
|
|
|
|
|
2003-10-12 22:39:02 -05:00
|
|
|
- A child always points to its parent (it can have only 1).
|
|
|
|
- A parent has a list of all children.
|
|
|
|
- A parent has a pointer to the current 'replica child', if one exists.
|
|
|
|
|
2005-11-01 21:32:36 -06:00
|
|
|
*/
|
2003-10-12 22:39:02 -05:00
|
|
|
|
2003-10-12 13:00:45 -05:00
|
|
|
------------------------- end of file ------------------------------
|