diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 35c2f8494f..a519d8be73 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -34,7 +34,9 @@ class TaxWithholdingCategory(Document): def validate_thresholds(self): for d in self.get("rates"): - if d.cumulative_threshold and d.cumulative_threshold < d.single_threshold: + if ( + d.cumulative_threshold and d.single_threshold and d.cumulative_threshold < d.single_threshold + ): frappe.throw( _("Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold").format( d.idx