mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
fix: Show itemised TDS breakup based on Apply TDS checkbox on item level
This commit is contained in:
@@ -466,7 +466,16 @@ class calculate_taxes_and_totals:
|
||||
if tax.charge_type == "Actual":
|
||||
# distribute the tax amount proportionally to each item row
|
||||
actual = flt(tax.tax_amount, tax.precision("tax_amount"))
|
||||
current_tax_amount = item.net_amount * actual / self.doc.net_total if self.doc.net_total else 0.0
|
||||
|
||||
if tax.get("is_tax_withholding_account") and item.meta.get_field("apply_tds"):
|
||||
if not item.get("apply_tds") or not self.doc.tax_withholding_net_total:
|
||||
current_tax_amount = 0.0
|
||||
else:
|
||||
current_tax_amount = item.net_amount * actual / self.doc.tax_withholding_net_total
|
||||
else:
|
||||
current_tax_amount = (
|
||||
item.net_amount * actual / self.doc.net_total if self.doc.net_total else 0.0
|
||||
)
|
||||
|
||||
elif tax.charge_type == "On Net Total":
|
||||
current_tax_amount = (tax_rate / 100.0) * item.net_amount
|
||||
|
||||
Reference in New Issue
Block a user