Friday 19 September 2014

CURRENCY CONVERTER USING X++ CODE

We have to convert the currency from "Some other country to US Dollar" in Job,

Here  "CurrencyExchangeHelper" is the Main class for convert the currency.

Then   CurrencyCode,  AmountCur, AmountMst  are EDT elements.

static void CurrencyConvertor(Args _args)
{
CurrencyExchangeHelper currencyExchangeHelper;
CurrencyCode transCurrency = "INR";
AmountCur amountCur = 500.00;
AmountMst amountMST;

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

The Output Screen is,


Now it converts INR  to US Dollar.If you change the INR into EUR then it converts the currency EUR into US Dollar.

6 comments:

  1. I have a hard time describing my thoughts on content, but I really felt I should here. Your article is really great. I like the way you wrote this information.
    currency exchange widget 

    ReplyDelete
  2. i was just browsing along and came upon your blog. just wanted to say good blog and this article really helped me.
    widget currency converter

    ReplyDelete
  3. Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Mconvert Thanks a lot for sharing. Keep blogging..

    ReplyDelete
  4. I read that Post and got it fine and informative. convert currency

    ReplyDelete