From 609da0d042c61526146cb7cc3e9d7568b17e1a10 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 2 Aug 2024 13:12:04 +0530 Subject: [PATCH] fix: company filter for filtring tax withheld vouchers --- .../tax_withholding_category/tax_withholding_category.py | 3 +++ 1 file changed, 3 insertions(+) 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 bc184ed76f..8cd282c8bf 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -354,12 +354,14 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): AND ja.party in %s AND j.apply_tds = 1 AND j.tax_withholding_category = %s + AND j.company = %s """, ( tax_details.from_date, tax_details.to_date, tuple(parties), tax_details.get("tax_withholding_category"), + company, ), as_dict=1, ) @@ -477,6 +479,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): "unallocated_amount": (">", 0), "posting_date": ["between", (tax_details.from_date, tax_details.to_date)], "tax_withholding_category": tax_details.get("tax_withholding_category"), + "company": inv.company, } field = "sum(tax_withholding_net_total)" -- GitLab