diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 8f6edbe75ae..e1e3ba3e84e 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -380,6 +380,8 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai doc.pricing_rules = [] doc.return_against = source.name doc.set_warehouse = "" + if doctype == "Sales Invoice": + doc.is_debit_note = 0 if doctype == "Sales Invoice" or doctype == "POS Invoice": doc.is_pos = source.is_pos