From 3965451c7a78d3ea78d6fa5c57204448cbc24ec9 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 19 Aug 2019 17:40:29 +0530 Subject: [PATCH] Update erpnext/controllers/sales_and_purchase_return.py Co-Authored-By: Mangesh-Khairnar --- 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 6054b9015a..bc2876f824 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) - party_type == "customer" if doc.doctype in ("Sales Invoice", "Delivery Note") else "supplier" + party_type = "customer" if doc.doctype in ("Sales Invoice", "Delivery Note") else "supplier" if ref_doc.company == doc.company and ref_doc.get(pary_type) == doc.get(party_type) and ref_doc.docstatus == 1: # validate posting date time