From 6ab2106322a5972bb772cf374ffde3017462ca26 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 11 Feb 2025 17:52:15 +0530 Subject: [PATCH] fix: incorrect taxable_amount on `other_charges_calculation` --- erpnext/controllers/taxes_and_totals.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index ef3edf35464..8a247a05f03 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -1103,11 +1103,8 @@ def get_itemised_tax_breakup_data(doc): itemised_tax = get_itemised_tax(doc.taxes) itemised_tax_data = [] for item_code, taxes in itemised_tax.items(): - itemised_tax_data.append( - frappe._dict( - {"item": item_code, "taxable_amount": sum(tax.net_amount for tax in taxes.values()), **taxes} - ) - ) + taxable_amount = next(iter(taxes.values())).get("net_amount") + itemised_tax_data.append(frappe._dict({"item": item_code, "taxable_amount": taxable_amount, **taxes})) return itemised_tax_data