project QadFinancials > class BClosingPostingsReport > business logic query PostingHistByYearPeriod


Parameters


iiCompanyIdintegerCompany id
iiPeriodinteger
iiTillPeriodinteger
iiMaxPeriodinteger


query condition


  each PostingHist where
PostingHist.Company_Id = iiCompanyId AND
PostingHist.PostingHistYearPeriodFrom = iiPeriod AND
PostingHist.PostingHistYearPeriodTill >= iiTillPeriod AND
PostingHist.PostingHistYearPeriodFrom <= iiTillPeriod

      first BusinessRelation (conditional-join) where
BusinessRelation.BusinessRelation_ID = PostingHist.IntercoBusinessRelation_ID AND

      first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = PostingHist.CostCentre_ID AND

      first Currency (conditional-join) where
Currency.Currency_ID = PostingHist.Currency_ID AND

      first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = PostingHist.Division_ID AND

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

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = PostingHist.Journal_ID AND

      first Layer (conditional-join) where
Layer.Layer_ID = PostingHist.Layer_ID AND

      first PostingSafCombined (conditional-join) where
PostingSafCombined.PostingSafCombined_ID = PostingHist.PostingSafCombined_ID AND

          first SafStructure1 (conditional-join) where
SafStructure1.SafStructure_ID = PostingSafCombined.ProjectSafStructure_ID AND

          first SafStructure2 (conditional-join) where
SafStructure2.SafStructure_ID = PostingSafCombined.GLSafStructure_ID AND

          first SafStructure3 (conditional-join) where
SafStructure3.SafStructure_ID = PostingSafCombined.CostCentreSafStructure_ID AND

      first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = PostingHist.Project_ID AND


query resultset tqPostingHistByYearPeriod


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.
tcCCSafStructurecharacterSafStructure3.SafStructureCodeStructure Code
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcGLCodecharacterGL.GLCodeA code identifying 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.
tcGLSafStructurecharacterSafStructure2.SafStructureCodeStructure Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcLayerCodecharacterLayer.LayerCodeLayer Code
tiPostingHist_IDintegerPostingHist.PostingHist_IDRecord ID
tdPostingHistBalanceCreditCCdecimalPostingHist.PostingHistBalanceCreditCCSC Credit Balance
tdPostingHistBalanceCreditLCdecimalPostingHist.PostingHistBalanceCreditLCBC Balance Credit
tdPostingHistBalanceCreditPCdecimalPostingHist.PostingHistBalanceCreditPCPC Credit Balance
tdPostingHistBalanceCreditTCdecimalPostingHist.PostingHistBalanceCreditTCTC Credit Balance
tdPostingHistBalanceDebitCCdecimalPostingHist.PostingHistBalanceDebitCCSC Debit Balance
tdPostingHistBalanceDebitLCdecimalPostingHist.PostingHistBalanceDebitLCBC Balance Debit
tdPostingHistBalanceDebitPCdecimalPostingHist.PostingHistBalanceDebitPCPC Debit Balance
tdPostingHistBalanceDebitTCdecimalPostingHist.PostingHistBalanceDebitTCTC Debit Balance
tdPostingHistBalanceQTYdecimalPostingHist.PostingHistBalanceQTYQuantity Balance
tdPostingHistMovemntCreditCCdecimalPostingHist.PostingHistMovemntCreditCCSC Credit Activity
tdPostingHistMovemntCreditLCdecimalPostingHist.PostingHistMovemntCreditLCBC Movement Credit
tdPostingHistMovemntCreditPCdecimalPostingHist.PostingHistMovemntCreditPCPC Credit Activity
tdPostingHistMovemntCreditTCdecimalPostingHist.PostingHistMovemntCreditTCTC Credit Activity
tdPostingHistMovemntDebitCCdecimalPostingHist.PostingHistMovemntDebitCCSC Debit Activity
tdPostingHistMovemntDebitLCdecimalPostingHist.PostingHistMovemntDebitLCBC Movement Debit
tdPostingHistMovemntDebitPCdecimalPostingHist.PostingHistMovemntDebitPCPC Debit Activity
tdPostingHistMovemntDebitTCdecimalPostingHist.PostingHistMovemntDebitTCTC Debit Activity
tdPostingHistMovemntQTYdecimalPostingHist.PostingHistMovemntQTYQty Activity
tiPostingHistYearPeriodFromintegerPostingHist.PostingHistYearPeriodFromFrom Year/GL Period
tdPostingHistYTDCreditCCdecimalPostingHist.PostingHistYTDCreditCCSC Credit (YTD)
tdPostingHistYTDCreditLCdecimalPostingHist.PostingHistYTDCreditLCBC YTD Credit
tdPostingHistYTDCreditPCdecimalPostingHist.PostingHistYTDCreditPCPC Credit (YTD)
tdPostingHistYTDCreditTCdecimalPostingHist.PostingHistYTDCreditTCTC Credit (YTD)
tdPostingHistYTDDebitCCdecimalPostingHist.PostingHistYTDDebitCCSC Debit (YTD)
tdPostingHistYTDDebitLCdecimalPostingHist.PostingHistYTDDebitLCBC YTD Debit
tdPostingHistYTDDebitPCdecimalPostingHist.PostingHistYTDDebitPCPC Debit (YTD)
tdPostingHistYTDDebitTCdecimalPostingHist.PostingHistYTDDebitTCTC Debit (YTD)
tdPostingHistYTDQTYdecimalPostingHist.PostingHistYTDQTYQuantity (YTD)
tiPostingSafCombined_IDintegerPostingHist.PostingSafCombined_IDLink to PostingSafCombined
tcProjectCodecharacterProject.ProjectCodeProject
tcProjectSafStructurecharacterSafStructure1.SafStructureCodeStructure Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(PostingHist),rowid(BusinessRelation),rowid(CostCentre),rowid(Currency),rowid(Division),rowid(GL),rowid(Journal),rowid(Layer),rowid(PostingSafCombined),rowid(SafStructure1),rowid(SafStructure2),rowid(SafStructure3),rowid(Project)


Internal usage


QadFinancials
method BClosingPostingsReport.HistoryPostingsCheck
dataset BClosingPostingsReport.tPrevPHist