From 219139e45bc55d729b45cdf84757cd6927baebe0 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 26 Nov 2025 11:21:18 +0530 Subject: [PATCH] fix: round the amount after exchange rate calculation --- lms/lms/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/lms/utils.py b/lms/lms/utils.py index e3c65b22..1bd04ccc 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -13,7 +13,6 @@ from frappe.desk.notifications import extract_mentions from frappe.rate_limiter import rate_limit from frappe.utils import ( add_months, - ceil, cint, cstr, flt, @@ -25,6 +24,7 @@ from frappe.utils import ( getdate, nowtime, pretty_date, + rounded, ) from lms.lms.md import find_macros, markdown_to_html @@ -928,7 +928,7 @@ def check_multicurrency(amount, currency, country=None, amount_usd=None): if apply_rounding and amount % 100 != 0: amount = amount + 100 - amount % 100 - return ceil(amount), currency + return rounded(amount), currency def apply_gst(amount, country=None): @@ -1197,7 +1197,7 @@ def get_categorized_courses(courses): @frappe.whitelist(allow_guest=True) -@rate_limit(limit=50, seconds=60 * 60) +@rate_limit(limit=200, seconds=60 * 60) def get_course_outline(course, progress=False): """Returns the course outline.""" outline = []