project QadFinancials > class BCInvoice > business logic query CInvoicePostingByCIPostingID

Description

CInvoicePostingByCIPostingID: query that returns the creditor-code based on the posting_id in the creditorposting-table


Parameters


iiCompanyIdintegerCompany id
iiPostingIDintegerPostingID: posting_id of table CInvoicePosting
iiCInvoiceIDintegerCInvoice_ID: CInvoice_id of table CInvoicePosting


query condition


  each CInvoicePosting where
CInvoicePosting.CInvoice_ID = iiCInvoiceID AND
CInvoicePosting.Posting_ID = iiPostingID

      first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = CInvoicePosting.CInvoice_ID AND

          first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND


query resultset tqCInvoicePostingByCIPostingID


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoicePosting.CInvoice_IDLink to CInvoice
tiCInvoicePosting_IDintegerCInvoicePosting.CInvoicePosting_IDRecord ID
tcCInvoicePostingTypecharacterCInvoicePosting.CInvoicePostingTypeInvoice Type. This field displays the invoice type.
Invoice Correction and Credit Note Correction display as choices only when the appropriate daybook types have already been defined.
tiPosting_IDintegerCInvoicePosting.Posting_IDLink to Posting
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tiCreditor_IDintegerCInvoice.Creditor_IDLink to Creditor
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code


Internal usage


QadFinancials
method BJournalEntry.CalcAllSelectPostingVat
method BJournalEntry.CalcAllSelectPostingVatV01