static void ExchangeRate(Args _args)
{
Currency currency;
Ledger ledger;
ExchangeRateCurrencyPair exchangeRateCurrencyPair;
ExchangeRate exchangeRate;
AmountMST amountMST;
CurrencyCode tocurrency = 'EUR';
//ledger::find(ledger::current()).ReportingCurrency
amountMST = currency::amountCur2MST(100,tocurrency,
ExchangeRate::findByDate(exchangeRateCurrencyPair::find(exchangeRate.RecId).RecId,
exchangeRate.ValidFrom).ExchangeRate);
info(strFmt("%1",amountMST));
}
{
Currency currency;
Ledger ledger;
ExchangeRateCurrencyPair exchangeRateCurrencyPair;
ExchangeRate exchangeRate;
AmountMST amountMST;
CurrencyCode tocurrency = 'EUR';
//ledger::find(ledger::current()).ReportingCurrency
amountMST = currency::amountCur2MST(100,tocurrency,
ExchangeRate::findByDate(exchangeRateCurrencyPair::find(exchangeRate.RecId).RecId,
exchangeRate.ValidFrom).ExchangeRate);
info(strFmt("%1",amountMST));
}
No comments:
Post a Comment