The store will not work correctly in the case when cookies are disabled.
Cerrar
Usamos cookies para mejorar tu experiencia en Sambil Online. Puedes saber más en nuestra
Política de cookies
Tiempo Fuerte
Tu centro comercial de siempre ahora también en internet
Suscríbete a nuestro boletínPara que disfrutes de ofertas,promociones y contenido exclusivo
");
let arr_2 = arr_1[1].split("");
let arr_3 = arr_2[0].split("Bs ");
let arr_4 = arr_3[1].replace(".", '');
let amount_igtf = arr_4.replace(",", '.');
let amountbs_c = amount_bsbase.innerHTML.split("Bs ");
let amountbs_r = amountbs_c[1].replace(".", '');
let amountbs = amountbs_r.replace(",", '.');
var gran_total = amountbs-amount_igtf;
amount_bsbase.innerHTML = "Bs "+numberToPointedString(gran_total)
console.log(amount_igtf)
console.log(gran_total)
igtflabel.style.display = "none";
}
}
function numberToPointedString(number){
const coma = number.toString().indexOf(".") !== -1 ? true : false;
const arrayNumero = coma ?
number.toString().split(".") :
number.toString().split("");
let integerPart = coma ? arrayNumero[0].split("") : arrayNumero;
let floatPart = coma ? arrayNumero[1] : null;
let result;
let subIndex = 1;
for(let i = integerPart.length - 1; i >= 0; i--){
if(integerPart[i] !== "." && subIndex % 3 === 0 && i != 0){
integerPart.splice(i, 0, ".");
subIndex++;
}else{
subIndex++;
}
}
integerPart = integerPart.toString();
integerPart = integerPart.replace(/,/gi,"");
if (floatPart.toString().length==1) {
floatPart = floatPart+"0";
}
result = coma ? integerPart + "," + floatPart : integerPart;
return result;
}
-->