Merge pull request #32412 from deepeshgarg007/tcs_deduction_issue

fix: Incorrect TCS amount deducted in Sales Invoice
diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
index 0b5df9e..84c2c9a 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
@@ -335,6 +335,9 @@
 		"party": ["in", parties],
 	}
 
+	if party_type == "Customer":
+		filters.update({"against_voucher": ["is", "not set"]})
+
 	if company:
 		filters["company"] = company
 	if from_date and to_date: