From a6ff6643863cca5e8f8e385946d044a282c27e34 Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 22 Oct 2020 16:30:57 +0530 Subject: [PATCH] fix: cannot auto unlink payments for credit/debit notes (#23689) --- 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 166564961d1..1818cb61025 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -605,8 +605,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)