Skip to content

Commit

Permalink
fix: LDC condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Aug 13, 2023
1 parent f5f5b5f commit c4bb0e4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,14 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N
ldc = get_lower_deduction_certificate(inv.company, tax_details, pan_no)
if tax_deducted:
net_total = inv.tax_withholding_net_total
limit_consumed = get_limit_consumed(ldc, parties)
if ldc and is_valid_certificate(ldc, posting_date, limit_consumed):
tax_amount = get_lower_deduction_amount(
net_total, limit_consumed, ldc.certificate_limit, ldc.rate, tax_details
)
if ldc:
limit_consumed = get_limit_consumed(ldc, parties)
if is_valid_certificate(ldc, posting_date, limit_consumed):
tax_amount = get_lower_deduction_amount(
net_total, limit_consumed, ldc.certificate_limit, ldc.rate, tax_details
)
else:
tax_amount = net_total * tax_details.rate / 100 if net_total > 0 else 0
else:
tax_amount = net_total * tax_details.rate / 100 if net_total > 0 else 0

Expand Down

0 comments on commit c4bb0e4

Please sign in to comment.