The Purchase entities are a family of complex entities, used in the Purchase area to support Purchase Orders, Purchase Shipments/Returns, Purchase Invoices/Credit Invoices, AP Debits and AP Credits.

At the center of all Sales entities is the dbBusinessDocument table - that is why these entities are called Purchase Business Documents.


Note: We are using the name Purchases in a "lose way" - it actually means all Purchase Documents (Invoice, Orders, Shipments, Payments etc).

In some cultures( or languages) these words  have a more strict meaning.


Simple Diagram of the Purchase Entities


* the above diagram is NOT complete - for more information see the database schema.


The main tables of the Purchase entities are:

  • PurchaseOrder entity -> includes the tables dbBusinessDocument, dbPurchaseOrder and dbBusinessDocument_ProductLine.
  • PurchaseShipment entity -> includes the tables dbBusinessDocument, dbPurchaseShipment and dbBusinessDocument_ProductLine.
  • Purchases entity -> includes the tables dbBusinessDocument, dbPurchases and dbBusinessDocument_ProductLine.
  • PurchasesAP entity -> includes the tables dbBusinessDocument and dbPurchasessAP.


The dbBusinessDocument table includes information about the Type of Document, the TransactionDate, the Numbering etc, fields that are common to all the Sales entities.

Every dbBusinessDocument is linked to a dbBusinesObject record that is linked to a fixed dbSystemObject record.

The dbSystemObject controls the transactions a Sales entity posts and dbBusinessObjects controls the remaining dbBusinessDocuments "behavior" - like the type of systemObject,  Print forms, numbering etc


Important notes:

  • dbPurchasesOrder, dbPurchasesShipment, dbPurchases and dbPurchasesAP include the field nBusinessDocumentPK that is a PK and a FK to dbBusinessDocument.
  • The nPartyFK is in dbPurchasesOrder, dbPurchasesShipment, dbPurchases and dbPurchasesAP tables AND not in the dbBusinessDocument table.
  • dbBusinessDocument_ProductLine is linked to the dbBusinessDocument table and contains the Products of a PurchasesOrder, PurchasesShipment or a Purchase.


Although the database model supports Products, even in a AP transaction (!!!), there is no supporting UI for the above.


All Purchases entities are automatically posted and create various transaction entries as soon as they are added to the Database.

This is different from what happened in previous versions where adding and posting where 2 different steps and 2 different calls from local procedures.

You still can "emulate" the old 2 step process by removing the call to posts from the main add procedures ...


* Note that SystemObjects are the most important part of the alpha360 apps and control the behavior of the apps.