The main table of the PurchaseAP Entity is the bPurchaseAP table - every bPurchaseAP 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 bPurchaseAP record - here the PK is the bBusinessDocument.sBusinessDocumentPK field and the FK is the bPurchaseAP.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 bPurchaseAP table, and
- we assign the bPurchaseAP.sBusinessDocumentFK as a PK of the bPurchasePayment 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 PurchaseAP Data Model
The bPurchaseAP table
The bPurchaseAP has the following important data:
- bPurchaseAP.sBusinessDocumentFK - the PK of the bPurchasePayment table and the FK for the relation with the bBusinessDocument table
- bPurchaseAP.sPartyFK - the FK for the [1,1]->[0,n] relation to the gParty table (list of Parties)
- bPurchaseAP.sPartyBranchFK - the FK for the [1,1]->[0,n] relation to the gPartyBranch table (list of Branches for Parties)
- bPurchaseAP.sPartyPostingFK - the FK for the [1,1]->[0,n] relation to the gPartyPosting table (list of Party Postings) - it controls the posting to GL.
- bPurchaseAP.cTOTALAmountCurrency - the TOTAL amount, in the documents original currency
- bPurchaseAP.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 bPurchaseAP record all its functionality (numbering, defaults, print forms) including its specific Business Object Role.
The bPurchaseAP table currently supports the following Business Objects Roles:
- PurchaseAP Payments, General PurchaseAP Credits and General PurchaseAP Debits
The bBusinessDocument_CashLine
The alpha360 supports one Payment distributed to many different CashBooks (or Cash Accounts) - the bBusinessDocument_CheckLine stores these "different payments" - note here that each record is related to the bBusinessDocument record.
The bBusinessDocument_CheckLine
The alpha360 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 -> Purchase Transactions
Copyright 2017 - computerplus