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

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


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

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


Retail (or POS) entities are also included in the Sales entities.

The autonomous POS application has it own entities - see the relevant documentation ...


Simple Diagram of the Sales Entities


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


The main tables of the Sales entities are:

  • SalesOrder entity -> includes the tables dbBusinessDocument, dbSalesOrder and dbBusinessDocument_ProductLine.
  • SalesShipment entity -> includes the tables dbBusinessDocument, dbSalesShipment and dbBusinessDocument_ProductLine.
  • Sales entity -> includes the tables dbBusinessDocument, dbSales and dbBusinessDocument_ProductLine.
  • SalesAR entity -> includes the tables dbBusinessDocument and dbSalesAR.


Depending on the implementation and local laws, the above, may be extended ...

 

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:

  • dbSalesOrder, dbSalesShipment, dbSales and dbSaleAR include the field nBusinessDocumentPK that is a PK and a FK to dbBusinessDocument.
  • The nPartyFK is in dbSalesOrder, dbSalesShipment, dbSales and dbSalesAR  tables AND not in the dbBusinessDocument table.
  • dbBusinessDocument_ProductLine is linked to the dbBusinessDocument table and contains the Products of a SalesOrder, SalesShipment or a SalesInvoice.


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


All Sales 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.