project QadFinancials > class BExpenseNote > business logic query ExpNoteCInvoiceByExpNote


Parameters


iiCompanyIdintegerCompany id
iiExpNote_IDinteger


query condition


  each ExpNoteCInvoice where
ExpNoteCInvoice.ExpNote_ID = iiExpNote_ID

      first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = ExpNoteCInvoice.CInvoice_ID AND

          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

          first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = CInvoice.Period_ID AND

      first ExpNote (inner-join) where
ExpNote.Company_Id = iiCompanyId AND
ExpNote.ExpNote_ID = ExpNoteCInvoice.ExpNote_ID AND


query resultset tqExpNoteCInvoiceByExpNote


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCreditLCdecimalCInvoice.CInvoiceBalanceCreditLCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitLCdecimalCInvoice.CInvoiceBalanceDebitLCBC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
ttCInvoiceDatedateCInvoice.CInvoiceDateInvoice Date. This field indicates the invoice creation date.
The system uses this field with the credit terms to calculate due date and discount date.
api annotation:This field defaults from the system date.
tcCInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
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.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
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.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiExpNote_IDintegerExpNoteCInvoice.ExpNote_IDLink to ExpNote
tdExpNoteCInvoiceDeductTCdecimalExpNoteCInvoice.ExpNoteCInvoiceDeductTCTC Deductible
tlExpNoteCInvoiceIsReturnedlogicalExpNoteCInvoice.ExpNoteCInvoiceIsReturnedIs Returned
tdExpNoteCInvoiceToReturnTCdecimalExpNoteCInvoice.ExpNoteCInvoiceToReturnTCTC To Return
ttExpNoteConfirmationDatedateExpNote.ExpNoteConfirmationDateConfirmation Date
tiExpNoteNumberintegerExpNote.ExpNoteNumberNumber
ttExpNoteRegistrationDatedateExpNote.ExpNoteRegistrationDateRegistration Date
tcExpNoteStatusCodecharacterExpNote.ExpNoteStatusCodeStatus
tiExpNoteYearintegerExpNote.ExpNoteYearYear
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(ExpNoteCInvoice),rowid(CInvoice),rowid(Currency),rowid(Journal),rowid(Period),rowid(ExpNote)


Internal usage


QadFinancials
method BExpenseNote.APIGetAdvancesInfo