diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index cb68315f9b0..e9633558ef9 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"