diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 4580b13613c..ac84217e6f9 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -4,6 +4,7 @@ import unittest import frappe +from frappe.tests.utils import change_settings from frappe.utils import today from erpnext.accounts.utils import get_fiscal_year @@ -152,6 +153,10 @@ class TestTaxWithholdingCategory(unittest.TestCase): for d in reversed(invoices): d.cancel() + @change_settings( + "Accounts Settings", + {"unlink_payment_on_cancellation_of_invoice": 1}, + ) def test_tcs_on_unallocated_advance_payments(self): frappe.db.set_value( "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS"