project QadFinancials > class B1099MiscellaneousReport > business logic query 1099Invoices (distinct)


Parameters


iiCompanyIdintegerCompany id
iiPaymentYearinteger
iiCreditorIDinteger
iiLiableCompanyIDinteger


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.Creditor_ID = iiCreditorID

      each CDocumentInvoiceXref (inner-join) where
CDocumentInvoiceXref.CInvoice_ID = CInvoice.CInvoice_ID AND

          first CDocument (inner-join) where
CDocument.CDocument_ID = CDocumentInvoiceXref.CDocument_ID AND
CDocument.CDocumentYear = iiPaymentYear and
CDocument.CDocumentStatus = 'PAID' and
CDocument.Company_ID = iiLiableCompanyID

      first PurchaseType (conditional-join) where
PurchaseType.PurchaseType_ID = CInvoice.PurchaseType_ID AND


query resultset tq1099Invoices


field namedata typedb fielddescription
tiCCollection_IDintegerCDocument.CCollection_IDLink to CCollection
tiCDocument_IDintegerCDocumentInvoiceXref.CDocument_IDLink to CDocument
tdCDocumentOriginalCreditLCdecimalCDocument.CDocumentOriginalCreditLCBC Original Credit.This field holds the amount of the Payment in baisc currency.
tcCDocumentStatuscharacterCDocument.CDocumentStatusStatus. The payment status. The default value for a new record is Initial.
tiCDocumentYearintegerCDocument.CDocumentYearYear/Number. This field displays the accounting year and payment sequence number, which is automatically generated by the accounting year.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tiCreditor_IDintegerCInvoice.Creditor_IDLink to Creditor
tiPurchaseType_IDintegerCInvoice.PurchaseType_IDPurchase Type
tiPurchaseType_ID2integerPurchaseType.PurchaseType_IDRecord ID
tcPurchaseTypeCodecharacterPurchaseType.PurchaseTypeCodePurchase Type


Internal usage


QadFinancials
method B1099MiscellaneousReport.GetReportData