From 6dfca79af31e4aa39a48a323f23c7b326b229504 Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Thu, 27 Apr 2023 15:04:50 +0530 Subject: [PATCH 1/3] fix: Report link, option, and added a link for Sales Person in GP --- erpnext/accounts/report/gross_profit/gross_profit.js | 2 +- erpnext/accounts/report/gross_profit/gross_profit.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index e89d42977b..53921dc66e 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -73,7 +73,7 @@ frappe.query_reports["Gross Profit"] = { if (column.fieldname == "sales_invoice" && column.options == "Item" && data && data.indent == 0) { column._options = "Sales Invoice"; } else { - column._options = "Item"; + column._options = ""; } value = default_formatter(value, row, column, data); diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 01fee281b0..81f5928628 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -250,7 +250,7 @@ def get_columns(group_wise_columns, filters): "label": _("Warehouse"), "fieldname": "warehouse", "fieldtype": "Link", - "options": "warehouse", + "options": "Warehouse", "width": 100, }, "qty": {"label": _("Qty"), "fieldname": "qty", "fieldtype": "Float", "width": 80}, @@ -305,7 +305,8 @@ def get_columns(group_wise_columns, filters): "sales_person": { "label": _("Sales Person"), "fieldname": "sales_person", - "fieldtype": "Data", + "fieldtype": "Link", + "options": "Sales Person", "width": 100, }, "allocated_amount": { @@ -326,14 +327,14 @@ def get_columns(group_wise_columns, filters): "label": _("Customer Group"), "fieldname": "customer_group", "fieldtype": "Link", - "options": "customer", + "options": "Customer Group", "width": 100, }, "territory": { "label": _("Territory"), "fieldname": "territory", "fieldtype": "Link", - "options": "territory", + "options": "Territory", "width": 100, }, "monthly": { From 72dd7884a89b7dcce342410c8bc3f3da56bf99e8 Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Thu, 27 Apr 2023 17:04:39 +0530 Subject: [PATCH 2/3] fix: Hyperlink in Quality Inspection Summary --- .../quality_inspection_summary/quality_inspection_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py index de96a6c032..38e05852ee 100644 --- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py +++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py @@ -69,7 +69,7 @@ def get_columns(filters): "label": _("Id"), "fieldname": "name", "fieldtype": "Link", - "options": "Work Order", + "options": "Quality Inspection", "width": 100, }, {"label": _("Report Date"), "fieldname": "report_date", "fieldtype": "Date", "width": 150}, From bdf2f7416a012576561e4911e89088c80bc6af6e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Apr 2023 15:16:02 +0530 Subject: [PATCH 3/3] fix: not able to create delivery note from sales order --- erpnext/stock/get_item_details.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index ce85702f48..f3adefb3e7 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1508,11 +1508,15 @@ def get_so_reservation_for_item(args): elif args.get("against_sales_invoice"): sales_order = frappe.db.get_all( "Sales Invoice Item", - filters={"parent": args.get("against_sales_invoice"), "item_code": args.get("item_code")}, + filters={ + "parent": args.get("against_sales_invoice"), + "item_code": args.get("item_code"), + "docstatus": 1, + }, fields="sales_order", ) if sales_order and sales_order[0]: - if get_reserved_qty_for_so(sales_order[0][0], args.get("item_code")): + if get_reserved_qty_for_so(sales_order[0].sales_order, args.get("item_code")): reserved_so = sales_order[0] elif args.get("sales_order"): if get_reserved_qty_for_so(args.get("sales_order"), args.get("item_code")):