numbervar RmVal:=0; numbervar Amt:=0; numbervar pAmt:=0; stringvar InWords :=""; Amt := Round({},0); if Amt > 10000000 then RmVal := truncate(Amt/10000000); if Amt = 10000000 then RmVal := 1; if RmVal = 1 then InWords := InWords + " " + towords(RmVal,0) + " crore" else if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000; if Amt > 100000 then RmVal := truncate(Amt/100000); if Amt = 100000 then RmVal := 1; if Amt = 0 then RmVal := 0; if RmVal >= 1 then InWords := InWords + " " + towords(RmVal,0) + " lac";
Amt := Amt - Rmval * 100000; if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0); pAmt := (Amt - truncate(Amt)) * 100; if pAmt > 0 then InWords := InWords + " and " + towords(pAmt,0) + " paisa only" else InWords := InWords + " only"; UPPERCASE(InWords)
ProperCase( ToWords({},0) )
ReplyDeletetowords(tonumber(mid(Cstr(),1,Instr(Cstr(),".",1)-1)),0) + " and " + ToWords (tonumber(mid(Cstr(),Instr(Cstr(),".",1)+1,len(Cstr()))),0) + " Paise only"
ReplyDeletenumbervar RmVal:=0;
ReplyDeletenumbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="";
Amt := Round({},0);
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if Amt = 0 then RmVal := 0;
if RmVal >= 1 then
InWords := InWords + " " + towords(RmVal,0) + " lac";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
else
InWords := InWords + " only";
UPPERCASE(InWords)