Skip to content

Commit

Permalink
Revert "fix: Rate from LDC in TDS reports (#33699)"
Browse files Browse the repository at this point in the history
This reverts commit db9beb3.
  • Loading branch information
ruthra-kumar authored Apr 21, 2023
1 parent 3ec1597 commit ed41dc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N
if tax_deducted:
net_total = inv.tax_withholding_net_total
if ldc:
tax_amount = get_tds_amount_from_ldc(ldc, parties, tax_details, posting_date, net_total)
tax_amount = get_tds_amount_from_ldc(
ldc, parties, pan_no, tax_details, posting_date, net_total
)
else:
tax_amount = net_total * tax_details.rate / 100 if net_total > 0 else 0

Expand Down Expand Up @@ -564,7 +566,7 @@ def get_invoice_total_without_tcs(inv, tax_details):
return inv.grand_total - tcs_tax_row_amount


def get_tds_amount_from_ldc(ldc, parties, tax_details, posting_date, net_total):
def get_tds_amount_from_ldc(ldc, parties, pan_no, tax_details, posting_date, net_total):
tds_amount = 0
limit_consumed = frappe.db.get_value(
"Purchase Invoice",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import frappe
from frappe import _
from frappe.utils import flt


def execute(filters=None):
Expand Down Expand Up @@ -66,12 +65,6 @@ def get_result(
else:
total_amount_credited += entry.credit

## Check if ldc is applied and show rate as per ldc
actual_rate = (tds_deducted / total_amount_credited) * 100

if flt(actual_rate) < flt(rate):
rate = actual_rate

if tds_deducted:
row = {
"pan"
Expand Down

0 comments on commit ed41dc2

Please sign in to comment.