{
CurrencyExchangeHelper currencyExchangeHelper;
AmountMst convertedamount;
CurrencyCode FromCurrency = ‘USD’;
CurrencyCode toCurrency = ‘EUR’;
AmountMst amountToConvert = 5000;
TransDate transactionDate = systemDateGet();
//initializing class CurrencyExchangeHelper
currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), transactionDate);
//converting AED to USD
convertedamount = currencyExchangeHelper.calculateCurrencyToCurrency(toCurrency, fromCurrency, amountToConvert, true);
info(strFmt(“Converted Amount: %1”, Convertedamount));
}
transaction currency into accounting currency:
accounting currency into transaction currency: