From eb6fb6fffabc879292862aed0a58aa7d3c1e6c8f Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 22 Oct 2020 16:31:55 +0530 Subject: [PATCH] fix: cannot auto unlink payments for credit/debit notes (#23690) --- erpnext/controllers/accounts_controller.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 31045a97671..58c7e847910 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -601,8 +601,6 @@ class AccountsController(TransactionBase): from erpnext.accounts.utils import unlink_ref_doc_from_payment_entries if self.doctype in ["Sales Invoice", "Purchase Invoice"]: - if self.is_return: return - if frappe.db.get_single_value('Accounts Settings', 'unlink_payment_on_cancellation_of_invoice'): unlink_ref_doc_from_payment_entries(self)