project QadFinancials > class BCDocumentReport > business logic query CDocumentInvoiceXrefByCDocId


Parameters


iiCompanyIdintegerCompany id
iiCDocumentIDinteger


query condition


  each CDocumentInvoiceXref where
CDocumentInvoiceXref.CDocument_ID = iiCDocumentID

      first CInvoice (outer-join) where
CInvoice.CInvoice_ID = CDocumentInvoiceXref.CInvoice_ID AND
CInvoice.Company_ID > 0

          first Creditor (outer-join) where
Creditor.Creditor_ID = CInvoice.Creditor_ID AND
Creditor.SharedSet_ID > 0

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

          first Journal (outer-join) where
Journal.Journal_ID = CInvoice.Journal_ID AND
Journal.SharedSet_ID > 0

          first Period (outer-join) where
Period.Period_ID = CInvoice.Period_ID AND
Period.Company_ID > 0


query resultset tqCDocumentInvoiceXrefByCDocId


field namedata typedb fielddescription
tiCDocument_IDintegerCDocumentInvoiceXref.CDocument_IDLink to CDocument
tdCDocumentInvoiceXrefAlloTCdecimalCDocumentInvoiceXref.CDocumentInvoiceXrefAlloTCTC Allocated Amount. This field indicates the invocie amount already Allocated in transaction currency.
tdCDocumentInvoiceXrefDiscTCdecimalCDocumentInvoiceXref.CDocumentInvoiceXrefDiscTCTC Discount Amount. This field indicates the discount amount of the invoice already allocated by transaction currency.
tdCDocumentInvoiceXRefPaidAmtTCdecimalCDocumentInvoiceXref.CDocumentInvoiceXRefPaidAmtTCTC Paid Amount
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceTCdecimalCInvoice.CInvoiceBalanceTCBalance. This field displays the sum of the debit and credit 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.
ttCInvoiceDiscountDueDatedateCInvoice.CInvoiceDiscountDueDateDiscount Due Date.This field indicates the last date a discount applies, calculated by the system based on the credit terms and the invoice date.
User can modify this field without affecting the credit terms.
ttCInvoiceDueDatedateCInvoice.CInvoiceDueDateDue Date.This field indicates the date when payment become due.
This field can be modified without affecting the credit terms.
This field is calculated by the system based on the credit terms and the invoice date.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC 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.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC 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.
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.
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.
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.
tiCreditor_IDintegerCreditor.Creditor_IDRecord ID
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCreditorDebtorNumbercharacterCreditor.CreditorDebtorNumberExternal Customer Number
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPaySelLine_IDintegerCDocumentInvoiceXref.PaySelLine_IDLink to PaySelLine
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year


Internal usage


QadFinancials
method BCDocumentReport.CDocumentReportAll