fix: cannot auto unlink payments for credit/debit notes (#23690)

This commit is contained in:
Saqib
2020-10-22 16:31:55 +05:30
committed by GitHub
parent ab5d596959
commit eb6fb6fffa

View File

@@ -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)