project QadFinancials > class BPosting > business logic query PostingLineByPostingDateGL


Parameters


iiCompanyIdintegerCompany id
itFromPostingDatedate
iiGLIDinteger
itToPostingDatedate
iiDivisionIDinteger
icGLCodeStartcharacter
icGLCodeEndcharacter
iiJournalIDinteger
ilGLIsBalanceAccountlogical
icLayerCandocharacter
icJournalCandocharacter
icDivisionCandocharacter
icCostCentreCandocharacter
icProjectCandocharacter
icCurrencycharacter
icFromICBusinessRelationcharacter
icToICBusinessRelationcharacter
icGLCategorycharacter
icExcludeJournalTypeCodecharacter
iiCanCCIDinteger


query condition


  each Posting where
Posting.Company_Id = iiCompanyId AND
Posting.PostingDate >= itFromPostingDate AND
Posting.PostingDate <= itToPostingDate AND
Posting.Journal_ID = iiJournalID

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND
Journal.JournalCode can-do icJournalCando AND
Journal.JournalTypeCode <> icExcludeJournalTypeCode

          first Layer (inner-join) where
Layer.Layer_ID = Journal.Layer_ID AND
Layer.LayerCode can-do icLayerCando

      first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = Posting.Period_ID AND
Period.PeriodTypeCode <> 'YEARCLOSE'

      each PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.Posting_ID = Posting.Posting_ID AND
PostingLine.GL_ID = iiGLID AND
PostingLine.Division_ID = iiDivisionID AND
PostingLine.CostCentre_ID = iiCanCCID

          first BusinessRelation (conditional-join) where
BusinessRelation.BusinessRelation_ID = PostingLine.IntercoBusinessRelation_ID AND
BusinessRelation.BusinessRelationCode >= icFromICBusinessRelation AND
BusinessRelation.BusinessRelationCode <= icToICBusinessRelation

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

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

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

          first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine.GL_ID AND
GL.GLCode >= icGLCodeStart AND
GL.GLCode <= icGLCodeEnd AND
GL.GLIsBalanceAccount = ilGLIsBalanceAccount AND
GL.GLCategory = icGLCategory

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


query sort order


GL.GL_ID (ascending)
Posting.PostingDate (ascending)


query resultset tqPostingLineByPostingDateGL


field namedata typedb fielddescription
tcBusinessRelationCodecharacterBusinessRelation.BusinessRelationCodeBusiness Relation. A code to identify the business relation.
If this field does not have a input from the user, the system automatically generates a number for the record based on the sequence defined in Business Relation Autonumber Create.
tiCostCentre_IDintegerPostingLine.CostCentre_IDCost Center Code
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tiCurrency_IDintegerPostingLine.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDivision_IDintegerPostingLine.Division_IDSub-Account Code
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcGLCategorycharacterGL.GLCategoryCategory: A code for classifying the account based on its function on financial statements.
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL.GLDescriptionA description of the GL account.
tlGLIsBalanceAccountlogicalGL.GLIsBalanceAccountThis field will be calculated by the system based on the value of tcBalance.
If the account is a Balance Sheet account the value will be true, if it is a Profit and Loss account then it will be false.
api annotation:This field can be left blank as it will be calculated by the system.
tcGLTypeCodecharacterGL.GLTypeCodeA code identifying the type of account.
tiJournal_IDintegerPosting.Journal_IDDaybook Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcJournalTypeCodecharacterJournal.JournalTypeCodeA daybook type code.
api annotation:Value for this field defaults to "Journal Entries".
tcLayerCodecharacterLayer.LayerCodeLayer Code
tcPeriodTypeCodecharacterPeriod.PeriodTypeCodeGL Period Type
tiPosting_IDintegerPosting.Posting_IDRecord ID
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
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.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tcProjectCodecharacterProject.ProjectCodeProject
tiCompany_IDintegerPosting.Company_IDLink to Company
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).
tiGL_IDintegerGL.GL_IDRecord ID
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.
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.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Posting),rowid(Journal),rowid(Layer),rowid(Period),rowid(PostingLine),rowid(BusinessRelation),rowid(CostCentre),rowid(Currency),rowid(Division),rowid(GL),rowid(Project)


Internal usage


QadFinancials
method BCashReport.RecalculateGLActualAmounts
method BGLReport.BalanceSheetReport
method BGLReport.CalClosingBalance
method BGLReport.CalculateClosingBalanceForDate
method BGLReport.CalculateOpeningBalanceForDate
method BGLReport.CalculateOpeningBalanceForNumberingDate
method BGLReport.CalculateYTDBalanceForDate
method BGLReport.CalGLForChineseBS
method BGLReport.CalMeasureActualsForISCC
method BGLReport.CalMeasureActualsForISDIV
method BGLReport.CalMeasureActualsForISGL
method BGLReport.CalMeasureActualsForMultiColISCC
method BGLReport.CalMeasureActualsForMultiColISDIV
method BGLReport.CalMeasureActualsForMultiColISGL
method BGLReport.CalOpeningBalance
method BGLReport.IncomeStatement
method BGLReport.MultiColBalanceSheet
method BGLReport.MultiColIncomeStatement
method BGLReport.UpdatetqTrialBalanceWithPostLine
dataset BGLReport.tLeadingAndTrailing