project QadFinancials > class BPosting > business logic query PostingLineForGLOpenItemRec

Description

Query to retrieve all existing gl open item transactions based on the input parameters needed for GL Open Item Reconciliatoin.


Parameters


iiCompanyIdintegerCompany id
iiGLIDinteger
itFromPostingDatedate
itToPostingDatedate
itPostingDatedate
icLayerTypecharacterlayer type
iiJournalIDinteger
icJournalCodescharacterList of Journal codes
icDivisionCodecharacter
icCostCentreCodecharacter
icProjectCodecharacter
iiCurrencyIDintegerCurrency ID


query condition


  each PostingLine where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.GL_ID = iiGLID AND
PostingLine.Currency_ID = iiCurrencyID AND
PostingLine.PostingDate >= itFromPostingDate AND
PostingLine.PostingDate <= itToPostingDate AND
PostingLine.PostingDate = itPostingDate

      first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = PostingLine.CostCentre_ID AND
CostCentre.CostCentreCode = icCostCentreCode

      first Currency (inner-join) where
Currency.Currency_ID = PostingLine.Currency_ID AND

      first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = PostingLine.Division_ID AND
Division.DivisionCode = icDivisionCode

      first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine.GL_ID AND

      each GLOpenItemMovement (outer-join) where
GLOpenItemMovement.PostingLine_ID = PostingLine.PostingLine_ID AND

          first GLOpenItem (outer-join) where
GLOpenItem.Company_Id = iiCompanyId AND
GLOpenItem.GLOpenItem_ID = GLOpenItemMovement.GLOpenItem_ID AND

      first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine.Posting_ID AND
Posting.Journal_ID = iiJournalID

          first BusinessRelation (conditional-join) where
BusinessRelation.BusinessRelationCode = Posting.PostingBusinessRelationTxt AND

          first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = Posting.Company_ID AND

          first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND
Journal.JournalCode can-do icJournalCodes

              first Layer (inner-join) where
Layer.Layer_ID = Journal.Layer_ID AND
Layer.LayerTypeCode = icLayerType

      first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = PostingLine.Project_ID AND
Project.ProjectCode = icProjectCode


query resultset tqPostingLineForGLOpenItemRec


field namedata typedb fielddescription
tcAllocationTypecharactercalculatedallocation type
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tiCompany_IDintegerPosting.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiCostCentre_IDintegerCostCentre.CostCentre_IDRecord ID
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCostCentreDescriptioncharacterCostCentre.CostCentreDescriptionDescription: a brief description of the cost center.
tiCurrency_IDintegerPostingLine.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDivision_IDintegerDivision.Division_IDRecord ID
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDivisionDescriptioncharacterDivision.DivisionDescriptionDescription
tiGL_IDintegerGL.GL_IDRecord ID
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL.GLDescriptionA description of the GL account.
tiGLOpenItem_IDintegerGLOpenItemMovement.GLOpenItem_IDLink to GLOpenItem
tdGLOpenItemBalanceLCdecimalGLOpenItem.GLOpenItemBalanceLCBC Balance
tlGLOpenItemIsOpenlogicalGLOpenItem.GLOpenItemIsOpenOpen
tcGLOpenItemKeycharacterGLOpenItem.GLOpenItemKeyAllocation Key
tiGLOpenItemMovement_IDintegerGLOpenItemMovement.GLOpenItemMovement_IDRecord ID
tcGLOpenItemMovementTypecharacterGLOpenItemMovement.GLOpenItemMovementTypeType
tcGLTypeCodecharacterGL.GLTypeCodeA code identifying the type of account.
tiJournal_IDintegerJournal.Journal_IDRecord ID
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcJournalDescriptioncharacterJournal.JournalDescriptionA brief description of the daybook.
api annotation:Value for this field defaults to null.
tcJournalTypeCodecharacterJournal.JournalTypeCodeA daybook type code.
api annotation:Value for this field defaults to "Journal Entries".
tiLayer_IDintegerJournal.Layer_IDLink to Layer
tcLayerCodecharacterLayer.LayerCodeLayer Code
tiPosting_IDintegerPosting.Posting_IDRecord ID
tcPostingBatchNumbercharacterPosting.PostingBatchNumberSome financial input programs allow you to enter a batch number and to keep a control total on the screen of all the transactions entered with the same batch number.
api annotation:Not applicable for application integration.
tcPostingBusinessRelationTxtcharacterPosting.PostingBusinessRelationTxtWhen the posting is a transaction linked to a business relation (for example, an invoice posting), this field contains the Business Relation Name. Used for information purposes on reports and browses.
api annotation:Value for this field defaults to blank.
ttPostingDatedatePosting.PostingDateThe accounting date on which the journal entry is posted. The posting date must be a valid calendar date and must be within the GL calendar year (PostingYear) and period (PostingPeriod).
tcPostingInvoiceReferenceTxtcharacterPosting.PostingInvoiceReferenceTxtWhen the posting is part of an invoice posting, then this field contains the invoice number (Year/Daybook/Voucher extended with supplier invoice Reference in case of a supplier invoice). Used for information purpose on reports and browsers.
api annotation:Value for this field defaults to blank
tiPostingLine_IDintegerPostingLine.PostingLine_IDRecord ID
tdPostingLineCCdecimalcalculated
tdPostingLineCreditCCdecimalPostingLine.PostingLineCreditCCSC Credit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLinCreditTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, you should enter the correct value for this field
tdPostingLineCreditLCdecimalPostingLine.PostingLineCreditLCBC Credit
api annotation:Partial Update = yes - it will get a default value depends on the value of PostingLineCreditTC, PostingLineExchangeRate & PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update is false, enter a value for this field.
tdPostingLineCreditTCdecimalPostingLine.PostingLineCreditTCTC Credit
tdPostingLineDebitCCdecimalPostingLine.PostingLineDebitCCSC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, enter the correct value for this field.
tdPostingLineDebitLCdecimalPostingLine.PostingLineDebitLCBC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineExchangeRate and PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update = false, enter the correct value into this field.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tdPostingLineLCdecimalcalculated
tiPostingLineOriginLineNbrintegerPostingLine.PostingLineOriginLineNbrEquivalent to PostingLineSequence, however there is a difference in format and the value may differ in a number of specific cases.
MfgPro Equivalent: glt_line
api annotation:Value for this field defaults to 0.
tdPostingLineTCdecimalcalculated
tcPostingLineTextcharacterPostingLine.PostingLineTextDescription
api annotation:Value for this field defaults to blank. Note: if a new record is created through the user interface, the default value is as same as the value of "PostingText" of tPosting.
tcPostingOriginDaybookCodecharacterPosting.PostingOriginDaybookCodeDaybook Code (normally this corresponds with our JournalCode)
MfgPro equivalent: glt_dy_code
tcPostingOriginDaybookNumbercharacterPosting.PostingOriginDaybookNumberDaybook Number (normally this corresponds with our PostingVoucher)
MfgPro equivalent: glt_dy_num
tcPostingOriginDocumentcharacterPosting.PostingOriginDocumentTransaction History Number (Inventory or Operations) or Invoice Number (Sales Order)
MfgPro equivalent: glt_doc
tcPostingOriginDocumentTypecharacterPosting.PostingOriginDocumentTypeDocument Type (I for Invoice, OP for Work Orders)
MfgPro equivalent: glt_doc_type
tlPostingOriginIsExternallogicalPosting.PostingOriginIsExternalIndicate whether the posting is from an External Origin. When creating cross company postings, set this to true.
api annotation:Value for this field defaults to false.
tcPostingOriginReferencecharacterPosting.PostingOriginReferenceGL Reference Number. Format is ZZYYMMDD999999 where ZZ = module (IC, SO, WO) YY = Year, MM = Month, DD = Day, 999999 = Running Journal Number.
MfgPro equivalent: glt_ref
tcPostingOriginTransTypecharacterPosting.PostingOriginTransTypeSystem generated code used to identify a transaction (IC for Inventory, WO for Work Orders, SO for Sales Orders, FA for Fixed Assets)
MfgPro equivalent: glt_tr_type
ttPostingSystemDatedatePosting.PostingSystemDateThe system date of the posting corresponding to "PostingDate".
api annotation:In Create mode, when Partial Update = yes - this field gets a default value which is the current date of the system.
tiPostingVoucherintegerPosting.PostingVoucherVoucher is a sequential number that uniquely identifies the journal entry (within the combination of an entity and a daybook code).
api annotation:In create mode,enter 0 in this field - the voucher number is generated by the system. In Modify/Delete, the correct voucher number must be entered because this identifies the record.
tiPostingYearPeriodintegerPosting.PostingYearPeriodThe GL calendar year/period for the posting. This field is determined by "PostingPeriod" and "PostingYear".
api annotation:If Partial Update is true, the value defaults using PostingPeriod and PostingYear.
tiProject_IDintegerProject.Project_IDRecord ID
tcProjectCodecharacterProject.ProjectCodeProject
tcProjectDescriptioncharacterProject.ProjectDescriptionDescription


Internal usage


QadFinancials
method BGLOpenItemProcessor.GetPossibleOpenItemTransactions
dataset BGLOpenItemProcessor.tPostingLineForGLOIRecon