project QadFinancials > class BDInvoice > business logic query DInvoiceForPayment

Description

Query on DInvoice that is used for making Payemtns against the invoice (note there are two variants of this query: one normal and one with additional joins that has extention Ext)


Parameters


iiCompanyIdintegerCompany id
iiDInvoiceIdintegerID of the Customer Invoice


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = iiDInvoiceId

      first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = DInvoice.Company_ID AND

          each CompanySharedSet (inner-join) where
CompanySharedSet.Company_Id = iiCompanyId AND
CompanySharedSet.Company_ID = Company.Company_ID AND

              first SharedSet (inner-join) where
SharedSet.SharedSet_ID = CompanySharedSet.SharedSet_ID AND
SharedSet.SharedSetTypeCode = 'EXCHANGERATE'

          first DomainProperty (inner-join) where
DomainProperty.Domain_ID = Company.Domain_ID AND

      first Currency (inner-join) where
Currency.Currency_ID = DInvoice.DInvoiceCurrency_ID AND


query resultset tqDInvoiceForPayment


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tdDInvoiceCCRatedecimalDInvoice.DInvoiceCCRateSC Rate. The statutory exchange rate used by the invoice.
The SC Invoice Amount is calculated based on the SC rate.
tdDInvoiceCCScaledecimalDInvoice.DInvoiceCCScaleScale Factor. This field indicates the scale factor applying to the SC rate in use for foreign currency payments.
tiDInvoiceCurrency_IDintegerDInvoice.DInvoiceCurrency_IDCurrency Code
tdDInvoiceExchangeRatedecimalDInvoice.DInvoiceExchangeRateExchange Rate. The accounting exchange rate used by the invoice.
The BC Invoice Amount is calculated based on the exchange rate.
If user modify the TC Invoice Amount, the BC invoice amount is automatically adjusted.
ttDInvoicePostingDatedateDInvoice.DInvoicePostingDatePosting Date. This field displays the date the sales-related invoice was generated by Invoice Post and Print.
This field is updated when the invoice is validated and saved.
api annotation:This field defaults from the invoice creation date.
tiDInvoicePostingYearintegerDInvoice.DInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tdDInvoiceRateScaledecimalDInvoice.DInvoiceRateScaleScale Factor.This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
The exchange rate is multiplied by the scale factor to determine the actual exchange rate.
api annotation:The value for the scale factor defaults from the exchange rate definition, but it can be modified.
tiDInvoiceVoucherintegerDInvoice.DInvoiceVoucherVoucher.This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is charged(after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiDivision_IDintegerDInvoice.Division_IDSub-Account
tiExchangeRateSharedSet_IDintegerSharedSet.SharedSet_IDRecord ID
tiLCCurrency_IDintegerDomainProperty.Currency_IDBase Currency
tcSharedSetTypeCodecharacterSharedSet.SharedSetTypeCodeShared Set Type
tiStatutoryCurrency_IDintegerDomainProperty.StatutoryCurrency_IDStatutory Currency


Internal usage


QadFinancials
method BBankEntry.GetPossibleAllocationsDInvoiceCrossCy
method BCDocument.StopAllQueries
method BCDocument.ValidateComponentPreInvXrefDI
method BDDocument.ValidateComponentPreInvXrefDI
method BDPaymentSelection.GetPaymentCurrencyAmounts