The Purchases entity is a complex document entity, used to support Purchase Invoices and Purchase Credits.


Simple Diagram of the  Purchases Entity

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


Tables of the Purchases entity:

  • Purchases entity -> includes the tables dbBusinessDocument, dbPurchases and dbBusinessDocument_ProductLine


The dbBusinessDocument table includes information about the type of Document, the transactionDate, the numbering etc, fields that are common to all the Purchase entities.

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

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


Important notes:

  • dbPurchases could have been named dbPurchasesInvoice for more consistent naming, but it wasn't (!!) - mainly for being consistent with the Sales naming ...
  • dbPurchases includes the field nBusinessDocumentPK that is its PK and its FK for the link with dbBusinessDocument,
  • the nPartyFK is in the dbPurchases table AND not in the dbBusinessDocument table,
  • dbBusinessDocument_ProductLine is linked to the dbBusinessDocument table and contains the Products of the Purchase,
  • the tables that supported VAT in previous releases have been eliminated.


All Purchase entities are automatically posted and various transaction entries are created as soon as the Purchase entities 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.