Thursday 27 February 2014

Currency Conversion

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));
   
   
}

No comments:

Post a Comment

Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO

There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...