Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Item): error message on tax rate #42955

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion erpnext/stock/doctype/item/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,13 @@ def add_default_uom_in_conversion_factor_table(self):
def validate_item_tax_net_rate_range(self):
for tax in self.get("taxes"):
if flt(tax.maximum_net_rate) < flt(tax.minimum_net_rate):
frappe.throw(_("Row #{0}: Maximum Net Rate cannot be greater than Minimum Net Rate"))
frappe.throw(
_("Taxes row #{0}: {1} cannot be smaller than {2}").format(
tax.idx,
bold(_(tax.meta.get_label("maximum_net_rate"))),
bold(_(tax.meta.get_label("minimum_net_rate"))),
)
)

def update_template_tables(self):
template = frappe.get_cached_doc("Item", self.variant_of)
Expand Down
Loading