Add type conversion
This commit is contained in:
@@ -900,7 +900,7 @@ function TS_IndexElement(
|
||||
betterGunPut(ref.get(data._key), null);
|
||||
toastr.success("Guardado!");
|
||||
if (SC_Personas[data.Persona].Puntos >= 10 && confirm("¿Pagar con Puntos? - Cancela para pagar con Efectivo.")) {
|
||||
SC_Personas[data.Persona].Puntos -= 10;
|
||||
SC_Personas[data.Persona].Puntos = parseInt(SC_Personas[data.Persona].Puntos) - 10;
|
||||
toastr.success(
|
||||
"¡Comada gratis para " +
|
||||
SC_Personas[data.Persona].Nombre +
|
||||
@@ -912,7 +912,7 @@ function TS_IndexElement(
|
||||
"!"
|
||||
);
|
||||
} else {
|
||||
SC_Personas[data.Persona].Puntos += 1;
|
||||
SC_Personas[data.Persona].Puntos = parseInt(SC_Personas[data.Persona].Puntos) + 1;
|
||||
toastr.success("¡Comada DE PAGO!");
|
||||
}
|
||||
SEA.encrypt(SC_Personas[data.Persona], SECRET, (encrypted) => {
|
||||
|
||||
@@ -123,7 +123,7 @@ PAGES.personas = {
|
||||
Nombre: document.getElementById(field_nombre).value,
|
||||
Region: document.getElementById(field_zona).value,
|
||||
Roles: dt.getAll("perm").join(",") + ",",
|
||||
Puntos: document.getElementById(field_puntos).value,
|
||||
Puntos: parseInt(document.getElementById(field_puntos).value),
|
||||
SC_Anilla: document.getElementById(field_anilla).value,
|
||||
Foto: resized,
|
||||
markdown: document.getElementById(field_notas).value,
|
||||
|
||||
Reference in New Issue
Block a user