static void convertAmountInWords()
{
str _currency2 = 'Paise',_currency1 = 'Rupees',word, decWord;
real _amount = 678.56 , decimals;
int repPos, repPos1,repPos2;
;
word = Global::numeralsToTxt_EN(_amount);
repPos = strscan(word, ' and', 1, strlen(word));
decimals = _amount - real2int(_amount);
if (decimals == 0.00)
{
word = strdel(strpoke(word, strfmt(' %1', _currency1), repPos), 1, 4);
word = strdel(word, strscan(word, '/100', 1, strlen(word)), 4);
}
else
{
decWord = substr(num2str(decimals, 0, 2, 1, 1), 3, 2);
decWord = Global::numeralsToTxt_EN(str2num(decWord));
repPos1 = strscan(decWord, ' and', 1, strlen(decWord));
decWord = strpoke(decWord, strfmt(' %1', _currency2), repPos1);
decWord = strdel(decWord, 1, 4);
word = strdel(strpoke(word, strFmt(' %1 and %2', _currency1, decWord), repPos), 1, 4);
word = strdel(word, strscan(word, '/100', 1, strlen(word)), 4);
word = strdel(word, strscan(word, '0', 1, strlen(word)), 4);
repPos2 = strscan(word, ' and', 1, strlen(word));
word = strIns(word,'\n',repPos2);
}
info(word);
}