project QadFinancials > class BDInvoice > business logic query DInvoicePostingByDIPostingID

Description

DInvoicePostingByDIPostingID: query that returns the debtor-code based on the posting_id in the debtorposting-table


Parameters


iiPostingIDintegerPostingID: posting_id of table DInvoicePosting
iiDInvoiceIDintegerDInvoiceID: DInvoice_id of table DInvoicePosting
iiCompanyIdintegerCompany id


query condition


  each DInvoicePosting where
DInvoicePosting.DInvoice_ID = iiDInvoiceID AND
DInvoicePosting.Posting_ID = iiPostingID

      first DInvoice (inner-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = DInvoicePosting.DInvoice_ID AND

          first Debtor (inner-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = DInvoice.Debtor_ID AND


query resultset tqDInvoicePostingByDIPostingID


field namedata typedb fielddescription
tiDInvoicePosting_IDintegerDInvoicePosting.DInvoicePosting_IDRecord ID
tiDInvoice_IDintegerDInvoicePosting.DInvoice_IDLink to DInvoice
tiPosting_IDintegerDInvoicePosting.Posting_IDLink to Posting
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tiDebtor_IDintegerDInvoice.Debtor_IDLink to Debtor
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.


Internal usage


QadFinancials
method BDDocument.UpdateDDocument
method BJournalEntry.CalcAllSelectPostingVat
method BJournalEntry.CalcAllSelectPostingVatV01