Reputation: 872
Quite simply, what is this method for, and what is _isMexican? My online searching has proven futile.
http://msdn.microsoft.com/en-us/library/global.checkpower.aspx
Upvotes: 1
Views: 246
Reputation: 335
This has to do with how Dynamics AX translates numeric currency values into text.
Try creating a new job in the AOT with the following contents:
static void Job1(Args _args)
{
info(Global::numeralsToTxt_ES(120000.45,GenderMaleFemale::Female,0,"MXN",1,0));
}
The parameters are as follows:
With isMexican = 1, it outputs this result: Ciento veinte mil 45/100
With isMexican = 0, it outputs this result: CIENTO VEINTE MIL con CUARENTA Y CINCO centimos
So basically, this is a text formatter for translation of currency amounts into a given language. Some languages or Countries have specific ways they want the written form to appear, that boolean influences it.
The CheckPower method is part of this logic, and it recursively calls itself to iterate over all the powers of a given currency (Billions, Millions, etc), each time adding the proper word to the currency string.
Upvotes: 3