Fix total sum report (#2921)

* Fix total sum

Removes last item if it is a Totals Row before loading more items

* Update listing.js
This commit is contained in:
paurosello 2017-03-27 11:50:34 +02:00 committed by Rushabh Mehta
parent d57612bbe8
commit 344e87db83

View file

@ -324,6 +324,9 @@ frappe.ui.Listing = Class.extend({
}
if(r.values.length || this.force_render_view) {
if (this.data.length && this.data[this.data.length - 1]._totals_row) {
this.data.pop();
}
this.data = this.data.concat(r.values);
this.render_view(r.values);
// this.render_list(r.values);
@ -463,4 +466,4 @@ frappe.ui.Listing = Class.extend({
}
});
}
});
});