Skip to content

Commit

Permalink
Merge pull request #183 from RitvikSardana/develop-ritvik-discount-type
Browse files Browse the repository at this point in the history
fix: remove translation call from hooks.py and convert discount to float while validating discount
  • Loading branch information
RitvikSardana authored Jan 26, 2024
2 parents e7af91a + 15907db commit 7f77de8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion education/education/doctype/fee_structure/fee_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def calculate_total(self):

def validate_discount(self):
for component in self.components:
if component.discount > 100:
if flt(component.discount) > 100:
frappe.throw(
_("Discount cannot be greater than 100% in row {0}").format(component.idx)
)
Expand Down
2 changes: 1 addition & 1 deletion education/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

standard_portal_menu_items = [
{
"title": _("Admission"),
"title": "Admission",
"route": "/admissions",
"reference_doctype": "Student Admission",
"role": "Student",
Expand Down

0 comments on commit 7f77de8

Please sign in to comment.