Skip to content

Commit

Permalink
fix: TDS amount calculation post LDC breach
Browse files Browse the repository at this point in the history
(cherry picked from commit 1f9ef6c)
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed Jun 27, 2023
1 parent 3ed42e1 commit 851b887
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ def get_tds_amount_from_ldc(ldc, parties, tax_details, posting_date, net_total):
"supplier": ("in", parties),
"apply_tds": 1,
"docstatus": 1,
"tax_withholding_category": ldc.tax_withholding_category,
"posting_date": ("between", (ldc.valid_from, ldc.valid_upto)),
"company": ldc.company,
},
"sum(tax_withholding_net_total)",
)
Expand Down Expand Up @@ -603,7 +605,7 @@ def is_valid_certificate(
):
valid = False

available_amount = flt(certificate_limit) - flt(deducted_amount) - flt(current_amount)
available_amount = flt(certificate_limit) - flt(deducted_amount)

if (getdate(valid_from) <= getdate(posting_date) <= getdate(valid_upto)) and available_amount > 0:
valid = True
Expand Down

0 comments on commit 851b887

Please sign in to comment.