I'm encountering an issue where I am receiving a NaN when attempting to summarize columns of a report. Additionally, my query is only retrieving 1 row of data, but the grid is displaying 2 rows.
Does anyone have any suggestions on how to resolve this problem? Thank you in advance!
$.each(data["resultado"], function(key, item) {
totalPago += item.MontoPagado;
item.MontoPagado = item.MontoPagado.formatMoney(2, '.', ',');
self.TotalPagado(totalPago);
// Thousand Bill
totalMil += item.mil;
self.tMil(totalMil);
console.log(item);
// Five Hundred Bill
totalQuinientos += item.Quinientos;
self.tQuinientos(totalQuinientos);
// Two Hundred Bill
totalDoscientos += item.doscientos;
self.tDoscientos(totalDoscientos);
// One Hundred Bill
totalCien += item.cien;
self.tCien(totalCien);
// Fifty Bill
totalCincuenta += item.cincuenta;
self.tCincuenta(totalCincuenta);
self.listaReporte.push(item);
});
self.TotalPagado(totalPago.formatMoney(2, '.', ','));
self.tMil(totalMil);
self.tQuinientos(totalQuinientos);
self.tDoscientos(totalDoscientos);
self.tCien(totalCien);
self.tCincuenta(totalCincuenta);