Guest User

Untitled

a guest
Jan 24th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. totalAccumulator: function(acc, cell, row, row_count) {
  2. if (row.posting_date) {
  3. frappe.utils.report_total_accumulator(acc, cell, row, row_count);
  4. }
  5. if (cell.column.fieldname == "age" && cell.rowIndex === row_count-1) {
  6. const me = this;
  7. const n = me.bodyRenderer.visibleRows.filter(d => me.datamanager.getData(d.meta.rowIndex).posting_date).length;
  8. acc.content = flt(acc.content) / n;
  9. }
  10. }
Add Comment
Please, Sign In to add comment