mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge pull request #30573 from frappe/mergify/bp/develop/pr-30382
fix: Added validation for single_threshold in Tax With Holding Category (backport #30382)
This commit is contained in:
@@ -34,7 +34,9 @@ class TaxWithholdingCategory(Document):
|
|||||||
|
|
||||||
def validate_thresholds(self):
|
def validate_thresholds(self):
|
||||||
for d in self.get("rates"):
|
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(
|
frappe.throw(
|
||||||
_("Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold").format(
|
_("Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold").format(
|
||||||
d.idx
|
d.idx
|
||||||
|
|||||||
Reference in New Issue
Block a user