Merge pull request #50679 from frappe/mergify/bp/version-16-beta/pr-50658

fix: handle zero rate actual taxes in calculate_taxes_and_totals (backport #50658)
This commit is contained in:
Smit Vora
2025-11-21 17:10:21 +05:30
committed by GitHub

View File

@@ -505,8 +505,9 @@ class calculate_taxes_and_totals:
for idx, d in enumerate(self.doc._item_wise_tax_details):
tax = d.get("tax")
if not tax:
if not tax or (tax.get("charge_type") == "Actual" and d.rate == 0):
continue
tax._total_tax_breakup += d.amount or 0
tax._last_row_idx = idx