Update erpnext/controllers/sales_and_purchase_return.py
Co-Authored-By: Mangesh-Khairnar <mkhairnar10@gmail.com>
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index 6054b90..bc2876f 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -24,7 +24,7 @@
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