update
This commit is contained in:
@@ -562,7 +562,7 @@ PAGES.pagos = {
|
|||||||
if (!persona) return;
|
if (!persona) return;
|
||||||
|
|
||||||
// Check if paying with points or adding points
|
// Check if paying with points or adding points
|
||||||
if (persona.Puntos >= 10) {
|
if (false && persona.Puntos >= 10) {
|
||||||
if (confirm("¿Pagar con Puntos? (10 puntos) - Cancela para pagar con dinero y ganar 1 punto.")) {
|
if (confirm("¿Pagar con Puntos? (10 puntos) - Cancela para pagar con dinero y ganar 1 punto.")) {
|
||||||
persona.Puntos = parseInt(persona.Puntos) - 10;
|
persona.Puntos = parseInt(persona.Puntos) - 10;
|
||||||
toastr.success("¡Comanda gratis para " + persona.Nombre + "!");
|
toastr.success("¡Comanda gratis para " + persona.Nombre + "!");
|
||||||
@@ -972,7 +972,14 @@ PAGES.pagos = {
|
|||||||
ingresos: {}, // { id: monto }
|
ingresos: {}, // { id: monto }
|
||||||
gastos: {} // { id: monto }
|
gastos: {} // { id: monto }
|
||||||
};
|
};
|
||||||
|
var balance_real = 0;
|
||||||
|
setInterval(() => {
|
||||||
|
Object.values(SC_Personas).forEach(element => {
|
||||||
|
balance_real += SC_Personas.Monedero_Balance
|
||||||
|
});
|
||||||
|
document.getElementById(balance_total).innerText = balance_real.toFixed(2) + "€";
|
||||||
|
document.getElementById(balance_total).style.color = balance_real >= 0 ? "white" : "#ffcccc";
|
||||||
|
}, 1000);
|
||||||
TS_IndexElement(
|
TS_IndexElement(
|
||||||
"pagos",
|
"pagos",
|
||||||
config,
|
config,
|
||||||
@@ -1011,12 +1018,11 @@ PAGES.pagos = {
|
|||||||
// Update UI
|
// Update UI
|
||||||
document.getElementById(total_ingresos).innerText = totalIngresos.toFixed(2) + "€";
|
document.getElementById(total_ingresos).innerText = totalIngresos.toFixed(2) + "€";
|
||||||
document.getElementById(total_gastos).innerText = totalGastos.toFixed(2) + "€";
|
document.getElementById(total_gastos).innerText = totalGastos.toFixed(2) + "€";
|
||||||
document.getElementById(balance_total).innerText = balance.toFixed(2) + "€";
|
|
||||||
document.getElementById(balance_total).style.color = balance >= 0 ? "white" : "#ffcccc";
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById(btn_datafono).onclick = () => {
|
document.getElementById(btn_datafono).onclick = () => {
|
||||||
setUrlHash("pagos,datafono");
|
setUrlHash("pagos,datafono");
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user