Apr 21, 2014

Read Amount in English

numbervar value:= {tbPaymentVoucher.PayAmount};
value:= round(value,2);

numbervar decimal:= value - round(value, 0);

if decimal < 0 then
    value:= round(value, 0) - 1
else
    value:= round(value, 0);

if decimal < 0 then
    decimal:= decimal + 1;

decimal:= decimal * 100;

//stringvar string:= {tbPaymentVoucher.CurrPay}+ towords(value,0);
stringvar string:= towords(value,0);
string:= ProperCase (string) +' '+{tbPaymentVoucher.CurrPay};



if decimal = 0 then
    string + ' Only'
else
    string + ' And ' + ProperCase (towords(decimal,0))

0 comments:

Post a Comment

Nam Le © 2014 - Designed by Templateism.com, Distributed By Templatelib