project QadFinancials > class BCInvoice > business logic query CInvoiceByInvoiceNumber


Parameters


iiCompanyIdintegerCompany id
iiCInvoicePostingYearintegerPosting Year
iiCInvoiceVoucherintegerInvoice Voucher
icJournalCodecharacterDaybook code


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoicePostingYear = iiCInvoicePostingYear AND
CInvoice.CInvoiceVoucher = iiCInvoiceVoucher

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

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND
Journal.JournalCode = icJournalCode


query resultset tqCInvoiceByInvoiceNumber


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceCCRatedecimalCInvoice.CInvoiceCCRateSC Rate. The statutory exchange rate used by the invoice.
The SC Invoice Amount is calculated based on the SC rate.
tdCInvoiceCCScaledecimalCInvoice.CInvoiceCCScaleScale Factor. This field indicates the scale factor applying to the SC rate in use for foreign currency payments.
tdCInvoiceExchangeRatedecimalCInvoice.CInvoiceExchangeRateExchange Rate. The 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.
tlCInvoiceIsExternallogicalCInvoice.CInvoiceIsExternalExternal. This field indicates if the daybook used is external.
This field is calculated by the system using the daybook code.
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.
tiCInvoicePostingYearintegerCInvoice.CInvoicePostingYearYear.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.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (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.
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).


Internal usage


QadFinancials
method BCInvoice.AdditionalUpdatesAllAssignments
method BCInvoice.CheckLinkedInvoiceApiCC
method BCInvoice.CheckLinkedInvoiceCC
method BCInvoiceJournalEntry.ApiStdMaintainTTValidateExchangeRate

QadFitnesse
method BCInvoice.APICInvoiceReverse