project QadFinancials > class BClosingPostingsReport > business logic query BasePostingHistoryCheck


Parameters


iiCompanyIdintegerCompany id
iiPeriodinteger


query condition


  each Period where
Period.Company_Id = iiCompanyId AND
Period.PeriodYearPeriod = iiPeriod

      each Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Period_ID = Period.Period_ID AND

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

              first Layer (outer-join) where
Layer.Layer_ID = Journal.Layer_ID AND

          first PeriodMark (inner-join) where
PeriodMark.Company_Id = iiCompanyId AND
PeriodMark.PeriodMark_ID = Posting.PeriodMark_ID AND

          each PostingLine (outer-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.Posting_ID = Posting.Posting_ID AND

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

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

              first Currency (conditional-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

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

              each PostingSaf (conditional-join) where
PostingSaf.PostingLine_ID = PostingLine.PostingLine_ID AND

                  first Saf (conditional-join) where
Saf.Saf_ID = PostingSaf.Saf_ID AND

                  first SafStructure (conditional-join) where
SafStructure.SafStructure_ID = PostingSaf.SafStructure_ID AND

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


query sort order


PostingLine.PostingLine_ID (ascending)


query resultset tqBasePostingHistoryCheck


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.
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcLayerCodecharacterLayer.LayerCodeLayer Code
tcPeriodMarkCodecharacterPeriodMark.PeriodMarkCodeMark
tiPostingLine_IDintegerPostingLine.PostingLine_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
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.
tdPostingLineCreditPCdecimalPostingLine.PostingLineCreditPCPC Credit
api annotation:This field is obsolete and can be left blank.
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.
tdPostingLineDebitPCdecimalPostingLine.PostingLineDebitPCPC Debit
api annotation:This field is obsolete.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tdPostingLineQTYdecimalPostingLine.PostingLineQTYQuantity
api annotation:Value for this field defaults to 0.0000.
tiPostingSafInputSequenceintegerPostingSaf.PostingSafInputSequenceSequence number of this SAF within all the SAF lines for the same posting line.
tcPostingSafParentTypecharacterPostingSaf.PostingSafParentTypeParent Type. Indicates the parent type of this SAF record.
tcProjectCodecharacterProject.ProjectCodeProject
tiSaf_IDintegerPostingSaf.Saf_IDSAF Code
tcSafCodecharacterSaf.SafCodeSAF Code
tiSafStructure_IDintegerPostingSaf.SafStructure_IDStructure Code
tcSafStructureCodecharacterSafStructure.SafStructureCodeStructure Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Period),rowid(Posting),rowid(Journal),rowid(Layer),rowid(PeriodMark),rowid(PostingLine),rowid(BusinessRelation),rowid(CostCentre),rowid(Currency),rowid(Division),rowid(GL),rowid(PostingSaf),rowid(Saf),rowid(SafStructure),rowid(Project)


Internal usage


QadFinancials
method BClosingPostingsReport.HistoryPostingsCheck