project QadFinancials > class BExchangeRate > business logic query ExchangeRateByGreaterFromDate

Description

ExchangeRateGreaterFromDate


Parameters


itValidDateFromdateValid From Date
(query checks if ValidDateFrom > Valid From Date)
iiFromCurrencyIdintegerFrom Currency ID
iiToCurrencyIdintegerTo Currency ID
iiExchangeRateTypeIdintegerExchange RateType Id
iiCompanyIdintegerCompany id
icFromCurrencyCodecharacter
icToCurrencyCodecharacter
icExchangeRateTypeCodecharacter
iiSharedSetIdinteger


query condition


  each ExchangeRate where
ExchangeRate.FromCurrency_ID = iiFromCurrencyId AND
ExchangeRate.ToCurrency_ID = iiToCurrencyId AND
ExchangeRate.ExchangeRateType_ID = iiExchangeRateTypeId AND
ExchangeRate.ExchangeRateValidDateFrom > itValidDateFrom AND
ExchangeRate.SharedSet_ID = iiSharedSetId

      first Currency1 (inner-join) where
Currency1.Currency_ID = ExchangeRate.FromCurrency_ID AND
Currency1.CurrencyCode = icFromCurrencyCode

      first Currency2 (inner-join) where
Currency2.Currency_ID = ExchangeRate.ToCurrency_ID AND
Currency2.CurrencyCode = icToCurrencyCode

      first ExchangeRateType (inner-join) where
ExchangeRateType.ExchangeRateType_ID = ExchangeRate.ExchangeRateType_ID AND
ExchangeRateType.ExchangeRateTypeCode = icExchangeRateTypeCode


query sort order


ExchangeRate.ExchangeRateValidDateFrom (ascending)


query resultset tqExchangeRateByGreaterFromDate


field namedata typedb fielddescription
tcCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcCurrencyCode1characterCurrency2.CurrencyCodeCurrency Code
tdExchangeRatedecimalExchangeRate.ExchangeRateExchange Rate: This number is specified as the amount by which you multiply a single unit of a From Currency to reach the equivalent number of the To Currency units.
tiExchangeRate_IDintegerExchangeRate.ExchangeRate_IDid
tdExchangeRateScaledecimalExchangeRate.ExchangeRateScaleScale Factor: A number used in the exchange rate calculation to adjust the amount of the From Currency.
Typically used in hyperinflationary environments when the differences between currency values is large.
api annotation:Value for this field defaults to 1.0000000 .
tiExchangeRateType_IDintegerExchangeRate.ExchangeRateType_IDExchange Rate Type
tcExchangeRateTypeCodecharacterExchangeRateType.ExchangeRateTypeCodeA code identifying an exchange rate type. A number of types are predefined and required by the system.
ttExchangeRateValidDateFromdateExchangeRate.ExchangeRateValidDateFromValid from: The start date of the currency exchange relationship.
The effective period of an entry cannot overlap with another entry for the same relationship.
ttExchangeRateValidDateTilldateExchangeRate.ExchangeRateValidDateTillValid to: This field specify the date after which the exchange rate type becomes inactive.
api annotation:When creating a new exchange rate type, the system proposes a default validity end date based on the value you entered in the Default Validity field in Exchange Rate Type Create for the exchange rate type. However, you can overwrite the default value.
tiFromCurrency_IDintegerExchangeRate.FromCurrency_IDFrom Currency Code
tiSharedSet_IDintegerExchangeRate.SharedSet_IDLink to SharedSet
tiToCurrency_IDintegerExchangeRate.ToCurrency_IDTo Currency Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(ExchangeRate),rowid(Currency1),rowid(Currency2),rowid(ExchangeRateType)


Internal usage


QadFinancials
method BExchangeRate.DefaultValuesValidDateTill
method BExchangeRate.PreValidateComponentDateTill