project QadFinancials > class BClosingPostingsReport > business logic query PostedAllocation


Parameters


iiCompanyIdintegerCompany id
iiPeriodYearPeriodinteger
ilIsActivelogical


query condition


  each Allocation where
Allocation.Company_Id = iiCompanyId AND

      each AllocationBatchLine (inner-join) where
AllocationBatchLine.Allocation_ID = Allocation.Allocation_ID AND

          first AllocationBatch (inner-join) where
AllocationBatch.Company_Id = iiCompanyId AND
AllocationBatch.AllocationBatch_ID = AllocationBatchLine.AllocationBatch_ID AND
AllocationBatch.AllocationBatchIsActive = ilIsActive

          each AllocationPosting (inner-join) where
AllocationPosting.AllocationBatchLine_ID = AllocationBatchLine.AllocationBatchLine_ID AND

              first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = AllocationPosting.SourcePeriod_ID AND
Period.PeriodYearPeriod = iiPeriodYearPeriod

              first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = AllocationPosting.Posting_ID AND

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

      first PostingTemplate (inner-join) where
PostingTemplate.Company_Id = iiCompanyId AND
PostingTemplate.PostingTemplate_ID = Allocation.PostingTemplate_ID AND


query resultset tqPostedAllocation


field namedata typedb fielddescription
tiAllocation_IDintegerAllocation.Allocation_IDRecord ID
tcAllocationBatchCodecharacterAllocationBatch.AllocationBatchCodeAllocation Batch Code
tcAllocationCodecharacterAllocation.AllocationCodeAllocation Code
tcAllocationDenominAmountBycharacterAllocation.AllocationDenominAmountByAmt By
tcAllocationDenominAmountFrcharacterAllocation.AllocationDenominAmountFrFrom Amt
tcAllocationDescriptioncharacterAllocation.AllocationDescriptionDescription
tcAllocationSourceAmountBycharacterAllocation.AllocationSourceAmountByAmt By
tdAllocationSourceAmountLCdecimalAllocation.AllocationSourceAmountLCBC Amount
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPosting_IDintegerAllocationPosting.Posting_IDLink to Posting
tcPostingTemplateCodecharacterPostingTemplate.PostingTemplateCodeTemplate Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Allocation),rowid(AllocationBatchLine),rowid(AllocationBatch),rowid(AllocationPosting),rowid(Period),rowid(Posting),rowid(Journal),rowid(PostingTemplate)


Internal usage


QadFinancials
method BClosingPostingsReport.AllocationCheckDet