project QadFinancials > class BExchangeRate > business logic query ExchangeRateBySmallerFromDate

Description

search records where a date smaller then from date


Parameters


itValidDateFromdateValid From Date
(query checks if ValidDateFrom < Valid From Date)
iiFromCurrencyIdintegerFrom Currency ID
iiToCurrencyIdintegerTo Currency ID
iiExchangeRateTypeIdintegerExchange Rate Type Id
iiCompanyIdintegerCompany id


query condition


  each ExchangeRate where
ExchangeRate.SharedSet_Id = vi_EXCHANGERATE_sharedset(iiCompanyId) AND
ExchangeRate.FromCurrency_ID = iiFromCurrencyId AND
ExchangeRate.ToCurrency_ID = iiToCurrencyId AND
ExchangeRate.ExchangeRateType_ID = iiExchangeRateTypeId AND
ExchangeRate.ExchangeRateValidDateFrom < itValidDateFrom


query sort order


ExchangeRate.ExchangeRateValidDateFrom (ascending)


query resultset tqExchangeRateBySmallerFromDate


field namedata typedb fielddescription
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
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)


Internal usage


QadFinancials
method BExchangeRate.PreValidateComponentDateTill