project QadFinancials > class BAPMatching > business logic query APMatchingByCInvoiceIDRowidID

Description

APMatchingByCInvoiceIDRowidID: simple query that tries to find APMathcing-records based on the CInvoice_ID and that returns the posting-key (in case the APMathcing was finished)


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIDintegerCInvoiceID
icSkipAPMatchingRowidcharacterThis parameter can contain the rowid (converted to string) of an APMatching-record that shoudl NOT be in the result-set.


query condition


  each APMatching where
APMatching.Company_Id = iiCompanyId AND
APMatching.CInvoice_ID = iiCInvoiceID AND
rowid(APMatching) <> to-rowid(icSkipAPMatchingRowid)

      first Journal (outer-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = APMatching.Journal_ID AND

      first Posting (outer-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = APMatching.Posting_ID AND


query resultset tqAPMatchingByCInvoiceIDRowidID


field namedata typedb fielddescription
tiAPMatching_IDintegerAPMatching.APMatching_IDRecord ID
ttAPMatchingDatedateAPMatching.APMatchingDateDate
tcAPMatchingStatuscharacterAPMatching.APMatchingStatusStatus
tiCInvoice_IDintegerAPMatching.CInvoice_IDVoucher
tiCompany_IDintegerAPMatching.Company_IDLink to Company
tiJournal_IDintegerAPMatching.Journal_IDDaybook
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPosting_IDintegerAPMatching.Posting_IDVoucher
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.


Internal usage


QadFinancials
method BAPMatching.ValidateComponentPost
method BAPMatching.ValidateComponentPostAPM2