diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 3cdecd8ddb..0edae6c29a 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -868,8 +868,9 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { filters: this.get_filters_for_args() }).then(total_count => { this.total_count = total_count || current_count; + this.count_without_children = count_without_children !== current_count ? count_without_children : undefined; let str = __('{0} of {1}', [current_count, this.total_count]); - if (count_without_children !== current_count) { + if (this.count_without_children) { str = __('{0} of {1} ({2} rows with children)', [count_without_children, this.total_count, current_count]); } return str; diff --git a/frappe/public/js/frappe/views/reports/report_view.js b/frappe/public/js/frappe/views/reports/report_view.js index 2547dd6407..b46e6fb374 100644 --- a/frappe/public/js/frappe/views/reports/report_view.js +++ b/frappe/public/js/frappe/views/reports/report_view.js @@ -1401,7 +1401,7 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView { } ]; - if (this.total_count > args.page_length) { + if (this.total_count > this.count_without_children || args.page_length) { fields.push({ fieldtype: 'Check', fieldname: 'export_all_rows',