Friday, 19 September 2014

CURRENCY CONVERSION IN AX 2012

                                           CONVERSION OF CURRENCY

To convert the currency to standard USD |From any other Currency like EUR,INR etc......

Try the following code in a job.

static void SrchCurrncy(Args _args)
{
CurrencyExchangeHelper currencyExchangeHelper;
CurrencyCode transCurrency = 'INR'; // try with EUR also
AmountCur amountCur = 600.00;
AmountMst amountMST;

currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), systemDateGet());
amountMST = currencyExchangeHelper.calculateTransactionToAccounting(transCurrency, amountCur ,true);
info(strFmt("%1",amountMST));

}


Now run the code and see........... 



 The  Rs600 =$11.35  only.... !!!!!!!!!!!!!!!!!!!!!!!!!!!

1 comment:

  1. Hi can we do it for multiple currencies for CustAccountStatement Report in ax 2012

    ReplyDelete