project QadFinancials > class BPosting > business logic query PostingLineByCrossExternRef


Parameters


iiNotCompanyIdintegerCompany id
icPostingLineCrossExternRefcharacterPosting Line Cross Company External Reference
icPostingLineRowidcharacterRowid of PostingLine (The selected records should have a different rowid.)
iiCrossCompanyPostingLineIDintegerCross Company Posting Line ID: -999999 is used to look for 0.
iiCompanyIdintegerCompany id


query condition


  each PostingLine where
PostingLine.PostingLineCrossExternRef = icPostingLineCrossExternRef AND
PostingLine.CrossCompanyPostingLine_ID = (if iiCrossCompanyPostingLineID = -999999 then 0 else iiCrossCompanyPostingLineID) AND
rowid(PostingLine) <> icPostingLineRowid AND
PostingLine.Company_ID <> iiNotCompanyId

      first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = PostingLine.Company_ID AND

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

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

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


query resultset tqPostingLineByCrossExternRef


field namedata typedb fielddescription
tiCompany_IDintegerPostingLine.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiCostCentre_IDintegerPostingLine.CostCentre_IDCost Center Code
tiCrossCompany_IDintegerPostingLine.CrossCompany_IDLink to Company
tiCrossCompanyPosting_IDintegerPostingLine.CrossCompanyPosting_IDPosting (Cross-Cy)
tiCrossCompanyPostingLine_IDintegerPostingLine.CrossCompanyPostingLine_IDPosting line (Cross-Cy)
tiCurrency_IDintegerPostingLine.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDivision_IDintegerPostingLine.Division_IDSub-Account Code
tiGL_IDintegerPostingLine.GL_IDGL Description
tiIntercoBusinessRelation_IDintegerPostingLine.IntercoBusinessRelation_IDIntercompany Code
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".
tiLayer_IDintegerJournal.Layer_IDLink to Layer
tiPeriod_IDintegerPostingLine.Period_IDLink to Period
tiPosting_IDintegerPostingLine.Posting_IDLink to Posting
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.
tdPostingLineCreditTCdecimalPostingLine.PostingLineCreditTCTC Credit
tcPostingLineCrossExternRefcharacterPostingLine.PostingLineCrossExternRefExt Reference (Cross-Cy) - must be filled when create a cross-company posting.
api annotation:Value for this field defaults to blank.
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.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tdPostingLineQTYdecimalPostingLine.PostingLineQTYQuantity
api annotation:Value for this field defaults to 0.0000.
tiPostingPeriodintegerPosting.PostingPeriodThe GL period for the posting. The period must be open.
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.
tiProject_IDintegerPostingLine.Project_IDDescription
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(PostingLine),rowid(Company),rowid(Currency),rowid(Posting),rowid(Journal)


Internal usage


QadFinancials
method BPosting.ValidateComponentPreAssignPostingLineCross