Regarding Exchange Rate

Hi Everyone,

i ve designed one export invoice report…

nw i ve to bring the exchange rate from the currency form depending upon the currency selected in the custtable form.

if start date is there for the exchange rate means i ve to bring tat exchange rate to my report… (currency form)

if start date is not there means i ve to choose the current invoice date to fetch the exchange rate.

Help me regarding this…

With Regards,

M.Madhan Kumar

Hi Madhan,

As you said
if start date is there for the exchange rate then which date it should take if it is having multiple start dates…

Naresh Kolli

Hi Naresh,

It should take the last updated start date…

how i can write the query for this, to fetch the exchange rate.

With Regards,

M.Madhan Kumar.

Hi Madhan,

Use find() method in the ExchRates tables…it fetches the last updated start date record…as foolows…
exchRates = ExchRates::find('USD;,systemdateget(),NoYes::No);

try thissmiliar to as this job…
static void Currency(Args _args)
ExchRates exchRates;
TransDate invDate;
Currency currency;
currency = Currency::find(‘USD’);
exchRates = ExchRates::find(currency.CurrencyCode,systemdateget(),NoYes::No);
print exchRates.ExchRate;

Naresh Kolli