project QadFinancials > class BLayer > business logic query LayerJournalForPosting


Parameters


iiCompanyIdintegerCompany id
itDateFromdate
itDateTodate
icDescriptioncharacter
iiJournalIdinteger
icLayerCodecharacter
icLayerTypeCodecharacter
iiPostingYearPeriodinteger
iiSkipJournalIDinteger
icTargetJournalTypeCodecharacter


query condition


  each Layer where
Layer.LayerTypeCode = icLayerTypeCode AND
Layer.LayerCode = icLayerCode

      each Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Layer_ID = Layer.Layer_ID AND
Journal.Journal_ID = iiJournalId AND
Journal.Journal_ID <> iiSkipJournalID AND
Journal.JournalTypeCode = icTargetJournalTypeCode

          each Posting (inner-join) where
Posting.Journal_ID = Journal.Journal_ID AND
Posting.Company_ID = iiCompanyId AND
Posting.PostingYearPeriod = iiPostingYearPeriod AND
Posting.PostingDate >= itDateFrom AND
Posting.PostingDate <= itDateTo AND
Posting.PostingText matches icDescription

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


query resultset tqLayerJournalForPosting


field namedata typedb fielddescription
tiJournal_IDintegerPosting.Journal_IDDaybook Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tlJournalIsActivelogicalJournal.JournalIsActiveIndicate if this is an active daybook.
api annotation:Value for this field defaults to false.
tcJournalTypeCodecharacterJournal.JournalTypeCodeA daybook type code.
api annotation:Value for this field defaults to "Journal Entries".
tiLayer_IDintegerJournal.Layer_IDLink to Layer
tcLayerCodecharacterLayer.LayerCodeLayer Code
tlLayerIsActivelogicalLayer.LayerIsActiveActive
tcLayerTypeCodecharacterLayer.LayerTypeCodeLayer Type
tiPosting_IDintegerPosting.Posting_IDRecord ID
tcPostingAutoReversalTypecharacterPosting.PostingAutoReversalTypeIf this posting is involved in automatic reversal activity of posting, value of this field will indicate whether this posting is the original one or the reversing one. It is calculated by the system.
api annotation:If the flag PostingIsAutoReversal is "true", the field value defaults to "ORIGINAL ENTRY" for the original posting, and to "REVERSING ENTRY" for the reversing posting.
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).
tlPostingIsAutoReversallogicalPosting.PostingIsAutoReversalIndicate whether the posting leads to an automatic reversal.
api annotation:Value for this field defaults to "false".
tiPostingPeriodintegerPosting.PostingPeriodThe GL period for the posting. The period must be open.
tiPostingTemplate_IDintegerPostingTemplate.PostingTemplate_IDRecord ID
tcPostingTemplateCodecharacterPostingTemplate.PostingTemplateCodeTemplate Code
tcPostingTextcharacterPosting.PostingTextFree text describing the posting.
api annotation:Value for this field defaults to blank
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.
tiPostingYearintegerPosting.PostingYearThe GL calendar year for the posting.
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.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Layer),rowid(Journal),rowid(Posting),rowid(PostingTemplate)


Internal usage


QadFinancials
method BMassLayerTransfer.ApiGetJournalEntries