<< Click to Display Table of Contents >> Navigation: PaXcel - functions > General Functions > GetExchangeRate() |
GetExchangeRate( Company, CurrencyCode, Period, ThisYear )
This function will return the exchange rate for the company, currency, period and year entered.
The arguments are as follows:
Company: This is the path to your Pastel data directory. For example:
c:\PastelData\_demo would enable you to retrieve information from the Pastel Partner demo company.
CurrencyCode: This is the currency code number used within Pastel and will be between 1 & 30. See Setup|Company Parameters or Edit|Exchange Rates
Period: The fiscal period you wish to return the exchange rate for, a period 1 - 13 is valid
Year: To return this years exchange rate enter 0, otherwise enter 1 for Last Year
Return the Exchange Rate for currency code 1, this year period 2
GetExchangeRate( C1, 1, 2, 0 )
Return the Exchange Rate for currency code 2, this year period 3
GetExchangeRate( C1, 2, 3, 0 )
Return the Exchange Rate for currency code 3, last year period 3
GetExchangeRate( C1, 3, 3, 1 )
|