Free javascript Hosting


amttext.js

Uploaded on Oct 09 2021 23:50 by fshykot

function amttext(x){

// x = document.getElementById('abc').value;
x = Number(x);
y = x.toFixed(2)
দশমিক = y.substring(y.length - 2);
mainnum = parseInt(y);
x = String(mainnum);
const basic = ["", "GK", "`yB", "wZb", "Pvi", "cvuP", "Qq", "mvZ", "AvU", "bq", "`k", "GMv‡iv", "ev‡iv", "‡Z‡iv", "‡PŠÏ", "c‡b‡iv", "‡lvj", "m‡Z‡iv", "AvVv‡iv", "Ewbk", "wek", "GKyk", "evBk", "‡ZBk", "PweŸk", "cuwPk", "QvweŸk", "mvZvk", "AvUvk", "EbwÎk", "wÎk", "GKwÎk", "ewÎk", "‡ZwÎk", "‡PŠwÎk", "cuqwÎk", "QwÎk", "mvuBwÎk", "AvUwÎk", "EbPwjøk", "Pwjøk", "GKPwjøk", "weqvwjøk", "‡ZZvwjøk", "Pyqvwjøk", "cuqZvwjøk", "wQPwjøk", "mvZPwjøk", "AvUPwjøk", "EbcÂvk", "cÂvk", "GKvbœ", "evqvbœ", "wZàvbœ", "Pyqvbœ", "cÂvbœ", "Qvàvbœ", "mvZvbœ", "AvUvbœ", "EblvU", "lvU", "GKlwÆ", "evlwÆ", "‡ZlwÆ", "‡PŠlwÆ", "cuqlwÆ", "‡QlwÆ", "mvZlwÆ", "AvUlwÆ", "EbmËi", "mËi", "GKvËi", "evnvËi", "wZqvËi", "PyqvËi", "cuPvËi", "wQqvËi", "mvZvËi", "AvUvËi", "EbAvwk", "Avwk", "GKvwk", "weivwk", "wZivwk", "Pyivwk", "cuPvwk", "wQqvwk", "mvZvwk", "AvUvwk", "EbbeŸB", "beŸB", "GKvbeŸB", "weivbeŸB", "wZivbeŸB", "PyivbeŸB", "cuPvbeŸB", "wQqvbeŸB", "mvZvbeŸB", "AvUvbeŸB", "wbivbeŸB"];


একক = "";
শতক = "";
হাজার = "";
লাখ = "";
কোটি = "";
len = x.length;
if (len < 10){
// ekok and doshok area
একক = x.substr(len - 2);

// শতক এরিয়া

if ( len > 2 ){
শতক = x.substr(len - 3);
শতক = শতক.substr(0,1);
}

// হাজার এরিয়া

if ( len == 4 ){
হাজার = x.substr(len - 4);
হাজার = হাজার.substr(0,1);
}else if ( len == 5 || len > 5){
হাজার = x.substr(len - 5);
হাজার = হাজার.substr(0,2);
}

//লাখ এরিয়া

if ( len == 6 ){
লাখ = x.substr(len - 6);
লাখ = লাখ.substr(0,1);
}else if ( len == 6 || len > 6){
লাখ = x.substr(len - 7);
লাখ = লাখ.substr(0,2);
}

// কোটি এরিয়া
if ( len == 8 ){
কোটি = x.substr(len - 8);
কোটি = কোটি.substr(0,1);
}else if ( len == 8 || len > 8){
কোটি = x.substr(len - 9);
কোটি = কোটি.substr(0,2);
}



if (parseInt(একক) > 0) {
একক = parseInt(একক);
একক = basic[একক];
}else{
একক = "";
}



if (parseInt(শতক) > 0) {
শতক = parseInt(শতক);
শতক = basic[শতক] + " kZ ";
}else{
শতক = "";
}

if (parseInt(হাজার) > 0) {
হাজার = parseInt(হাজার);
হাজার = basic[হাজার] + " nvRvi ";
} else{
হাজার = "";
}


if (parseInt(লাখ) > 0) {
লাখ = parseInt(লাখ);
লাখ = basic[লাখ] + " jÿ ";
} else{
লাখ = "";
}


if (parseInt(কোটি) > 0) {
কোটি = parseInt(কোটি);
কোটি = basic[কোটি] + " ‡KvwU ";
} else{
কোটি = "";
}


দশমিক = parseInt(দশমিক);
দশমিক = basic[দশমিক];

মূল = কোটি + লাখ + হাজার + শতক + একক;
দশ = দশমিক;

if (দশমিক.length > 1){
মূল = মূল + " UvKv " + দশমিক + " cqmv" + " gvÎ";
}else{
মূল = মূল + " UvKv " + " gvÎ";
}

// document.getElementById('demo').innerHTML = মূল;
return মূল;
} else {}


}

Back to list