diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index fd462a628e..5ce80d1baf 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -107,26 +107,28 @@ {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} - {%= __("Date") %} - {%= __("Age (Days)") %} - {%= __("Reference") %} - {% if(report.report_name === "Accounts Receivable") { %} - {%= __("Sales Person") %} + {%= __("Date") %} + {%= __("Age (Days)") %} + + {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person_in_print) { %} + {%= __("Reference") %} + {%= __("Sales Person") %} + {% } else { %} + {%= __("Reference") %} {% } %} {% if(!filters.show_pdc_in_print) { %} - {%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %} + {%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %} {% } %} {%= __("Invoiced Amount") %} {% if(!filters.show_pdc_in_print) { %} {%= __("Paid Amount") %} {%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %} {% } %} - {%= __("Outstanding Amount") %} + {%= __("Outstanding Amount") %} {% if(filters.show_pdc_in_print) { %} {% if(report.report_name === "Accounts Receivable") { %} {%= __("Customer LPO No.") %} {% } %} - {%= __("PDC/LC Date") %} {%= __("PDC/LC Ref") %} {%= __("PDC/LC Amount") %} {%= __("Remaining Balance") %} @@ -155,7 +157,7 @@ {%= data[i]["voucher_no"] %} - {% if(report.report_name === "Accounts Receivable") { %} + {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person_in_print) { %} {%= data[i]["sales_person"] %} {% } %} @@ -195,7 +197,6 @@ {%= data[i]["po_no"] %} {% } %} - {%= frappe.datetime.str_to_user(data[i][("pdc/lc_date")]) %} {%= data[i][("pdc/lc_ref")] %} {%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %} {%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %} @@ -226,7 +227,6 @@ {%= data[i][__("Customer LPO")] %} {% } %} - {%= frappe.datetime.str_to_user(data[i][__("PDC/LC Date")]) %} {%= data[i][("pdc/lc_ref")] %} {%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %} {%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %} diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index bbfee1112f..041335ddd1 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -102,14 +102,19 @@ frappe.query_reports["Accounts Receivable"] = { "fieldtype": "Link", "options": "Sales Person" }, + { + "fieldname":"based_on_payment_terms", + "label": __("Based On Payment Terms"), + "fieldtype": "Check", + }, { "fieldname":"show_pdc_in_print", "label": __("Show PDC in Print"), "fieldtype": "Check", }, { - "fieldname":"based_on_payment_terms", - "label": __("Based On Payment Terms"), + "fieldname":"show_sales_person_in_print", + "label": __("Show Sales Person in Print"), "fieldtype": "Check", }, {