Skip to content

Commit

Permalink
Merge pull request #35360 from frappe/mergify/bp/version-13/pr-35335
Browse files Browse the repository at this point in the history
fix: tds incorrectly calculated for invoice that are below threshold (backport #35335)
  • Loading branch information
ruthra-kumar authored May 18, 2023
2 parents c2ae8ea + d316955 commit 2747df7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
"docstatus": 1,
}

if not tax_details.get("consider_party_ledger_amount") and doctype != "Sales Invoice":
if doctype != "Sales Invoice":
filters.update(
{"apply_tds": 1, "tax_withholding_category": tax_details.get("tax_withholding_category")}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def test_tax_withholding_category_checks(self):
invoices.append(pi1)

# Cumulative threshold is 30000
# Threshold calculation should be on both the invoices
# TDS should be applied only on 1000
self.assertEqual(pi1.taxes[0].tax_amount, 1000)
# Threshold calculation should be only on the Second invoice
# Second didn't breach, no TDS should be applied
self.assertEqual(pi1.taxes, [])

for d in reversed(invoices):
d.cancel()
Expand Down

0 comments on commit 2747df7

Please sign in to comment.