fix: Tax withholding related fixes

(cherry picked from commit abf5b6be3e)
This commit is contained in:
Deepesh Garg
2022-10-07 14:04:36 +05:30
committed by Mergify
parent e031e095dd
commit 32a9575f07

View File

@@ -419,7 +419,10 @@ def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers):
):
# Get net total again as TDS is calculated on net total
# Grand is used to just check for threshold breach
net_total = frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(net_total)") or 0.0
net_total = 0
if vouchers:
net_total = frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(net_total)")
net_total += inv.net_total
supp_credit_amt = net_total - cumulative_threshold