fix: handle case where taxes is added invoice changed to non-export later

This commit is contained in:
Dany Robert
2025-08-08 11:01:59 +05:30
committed by GitHub
parent c8940a39b3
commit 29c3ef8280

View File

@@ -49,7 +49,7 @@ def update_itemised_tax_data(doc):
tax_amount += flt((row.net_amount * _tax_rate) / 100, row.precision("tax_amount"))
tax_rate += _tax_rate
if not tax_rate:
if not tax_rate or row.get("is_zero_rated"):
row.is_zero_rated = is_export or frappe.get_cached_value("Item", row.item_code, "is_zero_rated")
row.tax_rate = flt(tax_rate, row.precision("tax_rate"))