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

This commit is contained in:
Saqib 2020-10-22 16:30:57 +05:30 committed by GitHub
parent 6a0eb61af3
commit a6ff664386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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