fix: Check for return against delivery noteas well
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index cb68315..e963355 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)
- if doc.doctype == "Sales Invoice":
+ if doc.doctype in ("Sales Invoice", "Delivery Note"):
party_type = "customer"
else:
party_type = "supplier"