project QadFinancials > class BDInvoice > business logic query DInvoiceByOriginalDateDebtType

Description

check on amount, invoice, debtor


Parameters


iiCompanyIdintegerCompany id
itDInvoiceDatedateDInvoice Date
icDInvoiceTypecharacterDInvoice Type
iiDebtorIdintegerDebtor ID
iiCurrencyIdinteger
idDInvoiceOriginalCreditTCdecimalDInvoice Original Credit TC
idDInvoiceOriginalDebitTCdecimalDInvoice Original Debit TC
iiDInvoiceIdintegerDInvoice ID
icSkipRowIdcharacterSkip Row ID
icDebtorCodecharacterCustomer Code
icCurrencyCodecharacterCurrency Code


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoiceType matches icDInvoiceType AND
DInvoice.DInvoiceOriginalDebitTC = idDInvoiceOriginalDebitTC AND
DInvoice.DInvoiceOriginalCreditTC = idDInvoiceOriginalCreditTC AND
DInvoice.DInvoiceDate = itDInvoiceDate AND
DInvoice.Debtor_ID = iiDebtorId AND
DInvoice.DInvoiceCurrency_ID = iiCurrencyId AND
DInvoice.DInvoice_ID <> iiDInvoiceId AND
rowid(DInvoice) <> to-rowid(icSkipRowId)

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

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


query resultset tqDInvoiceByOriginalDateDebtType


field namedata typedb fielddescription
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
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.
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tiDInvoiceCurrency_IDintegerDInvoice.DInvoiceCurrency_IDCurrency Code
ttDInvoiceDatedateDInvoice.DInvoiceDateInvoice Date. This field indicates the invoice creation date.This field is normallly prior to the posting date and within the same accounting period as the posting date. The date must be within the upper and lower date limits of an open GL period.
The system uses the invoice date with the credit terms to calculate due date and discount date.
api annotation:This field defaults to the DInvoicePostingDate.
tdDInvoiceOriginalCreditTCdecimalDInvoice.DInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdDInvoiceOriginalDebitTCdecimalDInvoice.DInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
tcDInvoiceTypecharacterDInvoice.DInvoiceTypeInvoice 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.
api annotation:PartialUpdate = yes - defaults to Invoice


Internal usage


QadFinancials
method BDInvoice.ValidateComponentAllCheckAmountDateDebt