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
| iiCompanyId | integer | Company id |
| iiPostingID | integer | PostingID: posting_id of table CInvoicePosting |
| iiCInvoiceID | integer | CInvoice_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 name | data type | db field | description |
| tiCInvoice_ID | integer | CInvoicePosting.CInvoice_ID | Link to CInvoice |
| tiCInvoicePosting_ID | integer | CInvoicePosting.CInvoicePosting_ID | Record ID |
| tcCInvoicePostingType | character | CInvoicePosting.CInvoicePostingType | Invoice 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_ID | integer | CInvoicePosting.Posting_ID | Link to Posting |
| tiCompany_ID | integer | CInvoice.Company_ID | Link to Company |
| tiCreditor_ID | integer | CInvoice.Creditor_ID | Link to Creditor |
| tcCreditorCode | character | Creditor.CreditorCode | Supplier Code |
Internal usage
QadFinancials