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…
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…
It should take the last updated start date…
how i can write the query for this, to fetch the exchange rate.
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)
currency = Currency::find(‘USD’);
exchRates = ExchRates::find(currency.CurrencyCode,systemdateget(),NoYes::No);