project QadFinancials > class BCreditorReport > business logic query CInvoiceForMatchedReceiptb


Parameters


iiCompanyIdintegerCompany id
ilCInvoiceIsOpenlogical
itFromPostingDatedate
itToPostingDatedate
icFromCreditorCodecharacter
icToCreditorCodecharacter
icPurchaseTypecharacter
icCreditorTypecharacter
icCurrencyCodecharacter
iiFromPostingYearPeriodinteger
iiToPostingYearPeriodinteger


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoicePostingYearPeriod >= iiFromPostingYearPeriod AND
CInvoice.CInvoicePostingYearPeriod <= iiToPostingYearPeriod AND
CInvoice.CInvoiceIsOpen = ilCInvoiceIsOpen AND
CInvoice.CInvoicePostingDate >= itFromPostingDate AND
CInvoice.CInvoicePostingDate <= itToPostingDate AND
CInvoice.CInvoiceIsLogisticMatching = true AND
CInvoice.CInvoiceType <> {&INVOICETYPE-PREPAYMENT} AND
CInvoice.CInvoiceType <> {&INVOICETYPE-ADJUSTMENT}

      each APMatching (inner-join) where
APMatching.Company_Id = iiCompanyId AND
APMatching.CInvoice_ID = CInvoice.CInvoice_ID AND

          each APMatchingLn (inner-join) where
APMatchingLn.APMatching_ID = APMatching.APMatching_ID AND

              first pvod_det (inner-join) where
pvod_det.pvod_domain = APMatchingLn.PvoDomain AND
pvod_det.pvod_id = APMatchingLn.PvoID AND
pvod_det.pvod_id_line = APMatchingLn.PvodLineID AND

                  first pvo_mstr (inner-join) where
pvo_mstr.pvo_domain = pvod_det.pvod_domain AND
pvo_mstr.pvo_id = pvod_det.pvod_id AND

                      first prh_hist (inner-join) where
prh_hist.prh_domain = pvo_mstr.pvo_domain AND
prh_hist.prh_nbr = pvo_mstr.pvo_order AND
prh_hist.prh_receiver = pvo_mstr.pvo_internal_ref AND
prh_hist.prh_line = pvo_mstr.pvo_line AND

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND
Creditor.CreditorCode >= icFromCreditorCode AND
Creditor.CreditorCode <= icToCreditorCode

          first CreditorType (conditional-join) where
CreditorType.CreditorType_ID = Creditor.CreditorType_ID AND
CreditorType.CreditorTypeCode can-do icCreditorType

      first Currency (inner-join) where
Currency.Currency_ID = CInvoice.CInvoiceCurrency_ID AND
Currency.CurrencyCode = icCurrencyCode

      first PurchaseType (conditional-join) where
PurchaseType.PurchaseType_ID = CInvoice.PurchaseType_ID AND
PurchaseType.PurchaseTypeCode can-do icPurchaseType


query resultset tqCInvoiceForMatchedReceiptb


field namedata typedb fielddescription
tdAPMatchingLnMatchQtydecimalAPMatchingLn.APMatchingLnMatchQtyMatched Quantity
tdAPMatchingLnMatchUnitPricedecimalAPMatchingLn.APMatchingLnMatchUnitPriceMatched Unit Price
tcAPMatchingLnPvodIntRefcharacterAPMatchingLn.APMatchingLnPvodIntRefInternal Ref
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tlCInvoiceIsLogisticMatchinglogicalCInvoice.CInvoiceIsLogisticMatchingReceiver Matching.This field indicates If the Receiver Matching function is enabled.
This field is calculated by the system using the invoice status code.
tlCInvoiceIsOpenlogicalCInvoice.CInvoiceIsOpenOpen.This field indicates if the invoice has been completely paid.
This field is updated automatically when complete payment is confirmed.
This field is read-only.
api annotation:PartialUpdate = yes - defaults to true
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCreditorTypeCodecharacterCreditorType.CreditorTypeCodeCode
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcprh_currcharacterprh_hist.prh_currCurrency
tdprh_curr_amtdecimalprh_hist.prh_curr_amtCurrency Amt
tdprh_ex_ratedecimalprh_hist.prh_ex_rateExch Rate
tdprh_ex_rate2decimalprh_hist.prh_ex_rate2Exch Rate 2
tcprh_nbrcharacterprh_hist.prh_nbrOrder
tcprh_partcharacterprh_hist.prh_partItem Number
tdprh_pur_costdecimalprh_hist.prh_pur_costPO Cost
tdprh_rcvddecimalprh_hist.prh_rcvdReceipt Qty
tcprh_umcharacterprh_hist.prh_umUM
tcPurchaseTypeCodecharacterPurchaseType.PurchaseTypeCodePurchase Type


Internal usage


QadFinancials
method BCreditorReport.CInvoiceRegister