From 6be8bea934d2899d49013f2d9425b86c8fb24408 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sun, 8 Jul 2018 19:25:13 +0530 Subject: [PATCH] Provision to view return entries in Sales Person-wise Transaction Summary (#14830) --- .../sales_person_wise_transaction_summary.js | 6 ++++++ .../sales_person_wise_transaction_summary.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index 90244ce9f6..67051c8b5e 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -59,5 +59,11 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = { fieldtype: "Link", options: "Territory", }, + { + fieldname:"show_return_entries", + label: __("Show Return Entries"), + fieldtype: "Check", + default: 0, + }, ] } \ No newline at end of file diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index 19b6774ce9..ae2cf8c550 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -15,7 +15,7 @@ def execute(filters=None): data = [] for d in entries: - if d.stock_qty > 0: + if d.stock_qty > 0 or filters.get('show_return_entries', 0): data.append([ d.name, d.customer, d.territory, d.posting_date, d.item_code, item_details.get(d.item_code, {}).get("item_group"), item_details.get(d.item_code, {}).get("brand"),