The main table of the SalesAR Entity is the bSalesAR table - every bSalesAR record is related to one and only one bBusinessDocument record.
This is done with a one to one relation between the bBusinessDocument record and a bSalesAR record - here the PK is the bBusinessDocument.sBusinessDocumentPK field and the FK is the bSalesAR.sBusinessDocumentFK field.
To implement this type of relation in the Analysis:
- we have used a [0,n]->[1,1] link between the bBusinessDocument table and the bSalesAR table, and
- we assign the bSalesAR.sBusinessDocumentFK as a PK of the bSalesAR table - making it unique (see the image bellow).
This data model is built from the Universal Business Document Model
A general and simplified graph of the SalesAR Data Model
The bSalesAR table
The bSalesAR has the following important data:
- bSalesAR.sBusinessDocumentFK - the PK of the bSalesPayment table and the FK for the relation with the bBusinessDocument table
- bSalesAR.sPartyFK - the FK for the [1,1]->[0,n] relation to the gParty table (list of Parties)
- bSalesAR.sPartyBranchFK - the FK for the [1,1]->[0,n] relation to the gPartyBranch table (list of Branches for Parties)
- bSalesAR.sPartyPostingFK - the FK for the [1,1]->[0,n] relation to the gPartyPosting table (list of Party Postings) - it controls the posting to GL.
- bSalesAR.cTOTALAmountCurrency - the TOTAL amount, in the documents original currency
- bSalesAR.cTOTALAmountCurrency - the TOTAL amount, in the local currency
The bBusinessDocument table
The bBusinessDocument has the following important data:
- bBusinessDocument.sBusinessDocumentPK - the PK
- bBusinessDocument.sBusinessObjectFK - the FK for the [1,1]->[0,n] relation to the bBusinessObject table (list of Business Objects)
- bBusinessDocument.sCompanyFiscalYearFK - the FK for the [1,1]->[0,n] relation to the gCompanyFiscalYear table (list of fiscal years)
- bBusinessDocument.sCompanyBranchFK - the FK for the [1,1]->[0,n] relation to the gCompanyBranch table (list of company branches)
- bBusinessDocument.sCompanyDepartmentFK - the FK for the [1,1]->[0,n] relation to the gCompanyDepartment table (list of company departments)
- bBusinessDocument.sCurrencyFK - the FK for the [1,1]->[0,n] relation to the gCurrency table (list of currencies) - the documents Original Currency
- bBusinessDocument.cExchangeCurrency - the Exchange rate between the documents Original Currency and the LOCAL currency of the company
- bBusinessDocument.sDocumentID - a unicode string
- bBusinessDocument.dDocumentDate - the documents date
- bBusinessDocument.dTransactionDate - the documents transaction date (can be different from the DocumentDate)
- bBusinessDocument.bPosted - Post/Unpost flag
- bBusinessDocument.bPostedGL - Post/Unpost to General Ledger flag
- bBusinessDocument.bCanceled - Cancel flag
The bBusinessObject table
Every bBusinessDocument record has a [1,1]->[0,n] relation to a bBusinessObject record.
At the end, this record - the bBusinessObject record - gives the bSalesAR record all its functionality (numbering, defaults, print forms) including its specific Business Object Role.
The bSalesAR table currently supports the following Business Objects Roles:
- SalesAR Payments, General SalesAR Credits and General SalesAR Debits
The bBusinessDocument_PaymentLine
The alpha360 project supports one cash Payment distributed to many different CashBooks (or Cash Accounts) - the bBusinessDocument_CashLine stores these "different cash payments" - note here that each record is related to the bBusinessDocument record.
The bBusinessDocument_CheckLine
The alpha360 project supports one check Payment distributed to many different Checks - the bBusinessDocument_CheckLine stores these "different check payments" - note here that each record is related to the bBusinessDocument record.
next -> Sales Transactions
Copyright 2017 - computerplus