diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index 5b68f1d2ab0..9fefc037169 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -19,7 +19,13 @@

{%= __(report.report_name) %}

-

{%= filters.customer || filters.supplier %}

+

+ {% if (filters.customer_name) { %} + {%= filters.customer_name %} + {% } else { %} + {%= filters.customer || filters.supplier %} + {% } %} +

{% if (filters.tax_id) { %} {%= __("Tax Id: ")%} {%= filters.tax_id %} diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index f44ea448e7b..3f9d1678646 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -17,8 +17,9 @@ frappe.query_reports["Accounts Receivable"] = { "options": "Customer", on_change: () => { var customer = frappe.query_report_filters_by_name.customer.get_value(); - frappe.db.get_value('Customer', customer, "tax_id", function(value) { + frappe.db.get_value('Customer', customer, ["tax_id", "customer_name"], function(value) { frappe.query_report_filters_by_name.tax_id.set_value(value["tax_id"]); + frappe.query_report_filters_by_name.customer_name.set_value(value["customer_name"]); }); } }, @@ -81,6 +82,12 @@ frappe.query_reports["Accounts Receivable"] = { "label": __("Tax Id"), "fieldtype": "Data", "hidden": 1 + }, + { + "fieldname":"customer_name", + "label": __("Customer Name"), + "fieldtype": "Data", + "hidden": 1 } ],