project QadFinancials > class BCInvoice > business logic query CInvoiceVatForAPMSelection

Description

CInvoiceVatForAPMSelection: query on CInvoice with an outer-join to CInvoiceVat


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIDinteger


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = iiCInvoiceID

      each CInvoiceVat (outer-join) where
CInvoiceVat.CInvoice_ID = CInvoice.CInvoice_ID AND

          first Vat (outer-join) where
Vat.Vat_ID = CInvoiceVat.Vat_ID AND

              first Domains (outer-join) where
Domains.Domain_ID = Vat.Domain_ID AND

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

      first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = CInvoice.NormalPaymentCondition_ID AND


query resultset tqCInvoiceVatForAPMSelection


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency 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.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
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.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
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.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
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.
tiCInvoiceVat_IDintegerCInvoiceVat.CInvoiceVat_IDRecord ID
tlCInvoiceVatIsAccrRcpUslogicalCInvoiceVat.CInvoiceVatIsAccrRcpUsCInvoiceVatIsAccrRcpUS Tax is accrued at receipt. This is a parameter of the tax rate code in GTM.
tdCInvoiceVatNonRecTaxAmtTCdecimalCInvoiceVat.CInvoiceVatNonRecTaxAmtTCNon-Rev Tax Amount. This field displays the percentage of tax that is not recoverable.
Taxes are recoverable whenever your company is eligible to offset a percentage of tax on purchases against tax collected on sales. Recoverable taxes are common in Europe.
tdCInvoiceVatVatCreditLCdecimalCInvoiceVat.CInvoiceVatVatCreditLCBC Tax Amount CR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount CR and the Exchange rate.
tdCInvoiceVatVatCreditTCdecimalCInvoiceVat.CInvoiceVatVatCreditTCTC Tax Amount CR. This field displays the credit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatVatDebitLCdecimalCInvoiceVat.CInvoiceVatVatDebitLCBC Tax Amount DR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount DR and the Exchange rate.
tdCInvoiceVatVatDebitTCdecimalCInvoiceVat.CInvoiceVatVatDebitTCTC Tax Amount DR. This field displays the debit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDomain_IDintegerVat.Domain_IDDomain
tcDomainCodecharacterDomains.DomainCodeDomain
tiNormalPaymentCondition_IDintegerCInvoice.NormalPaymentCondition_IDCredit Terms Code
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tdPaymentConditionPercentagedecimalPaymentCondition.PaymentConditionPercentageDiscount Percentage
tiReason_IDintegerCInvoice.Reason_IDInvoice Status Code
tiVat_IDintegerVat.Vat_IDRecord ID
tcVatCodecharacterVat.VatCodeTax Code
tcVatInOutcharacterVat.VatInOutTax In/Out


Internal usage


QadFinancials
method BAPMatching.DefaultValuesInvoiceAmount