From e2acc748c81b4e2d7a4e96e8f64e7e9e09acf226 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 19 Aug 2019 16:38:04 +0530 Subject: [PATCH] fix: Check for return against delivery noteas well --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index cb68315f9b..e9633558ef 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -24,7 +24,7 @@ def validate_return_against(doc): else: ref_doc = frappe.get_doc(doc.doctype, doc.return_against) - if doc.doctype == "Sales Invoice": + if doc.doctype in ("Sales Invoice", "Delivery Note"): party_type = "customer" else: party_type = "supplier"