Merge branch 'main' of https://github.com/frappe/lms into lms-frappe-ui
This commit is contained in:
@@ -925,7 +925,7 @@ def get_payment_options(doctype, docname, phone, country):
|
|||||||
"name": frappe.db.get_single_value("Website Settings", "app_name"),
|
"name": frappe.db.get_single_value("Website Settings", "app_name"),
|
||||||
"description": _("Payment for {0} course").format(details["title"]),
|
"description": _("Payment for {0} course").format(details["title"]),
|
||||||
"order_id": order["id"],
|
"order_id": order["id"],
|
||||||
"amount": order["amount"] * 100,
|
"amount": cint(order["amount"]) * 100,
|
||||||
"currency": order["currency"],
|
"currency": order["currency"],
|
||||||
"prefill": {
|
"prefill": {
|
||||||
"name": frappe.db.get_value("User", frappe.session.user, "full_name"),
|
"name": frappe.db.get_value("User", frappe.session.user, "full_name"),
|
||||||
@@ -1039,13 +1039,15 @@ def create_order(client, amount, currency):
|
|||||||
try:
|
try:
|
||||||
return client.order.create(
|
return client.order.create(
|
||||||
{
|
{
|
||||||
"amount": amount * 100,
|
"amount": cint(amount) * 100,
|
||||||
"currency": currency,
|
"currency": currency,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Error during payment: {0}. Please contact the Administrator.").format(e)
|
_(
|
||||||
|
"Error during payment: {0} Please contact the Administrator. Amount {1} Currency {2} Formatted {3}"
|
||||||
|
).format(e, amount, currency, cint(amount))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ const set_calendar_range = (calendar, events) => {
|
|||||||
);
|
);
|
||||||
$(".calendar-range").text(`${calendar_date}`);
|
$(".calendar-range").text(`${calendar_date}`);
|
||||||
|
|
||||||
if (moment(events[0].date).isSameOrBefore(moment(calendar)))
|
if (moment(calendar_date).isSameOrBefore(moment(events[0].date)))
|
||||||
$("#prev-week").hide();
|
$("#prev-week").hide();
|
||||||
else $("#prev-week").show();
|
else $("#prev-week").show();
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ course.title }} {% endblock %} {% block page_content %}
|
|||||||
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
||||||
_("Subgroups") }} | {{ frappe.db.count("Cohort Mentor", {"cohort":
|
_("Subgroups") }} | {{ frappe.db.count("Cohort Mentor", {"cohort":
|
||||||
cohort.name}) }} {{ _("Mentors") }} | {{ frappe.db.count("LMS Enrollment",
|
cohort.name}) }} {{ _("Mentors") }} | {{ frappe.db.count("LMS Enrollment",
|
||||||
{"cohort": cohort.name}) }} {{ _("Students") }} | {{ frappe.db.count("Cohort
|
{"cohort": cohort.name}) }} {{ _("Students") }}
|
||||||
Join Request", {"cohort": cohort.name}) }} {{ _("Join Requests") }}
|
| {{ frappe.db.count("Cohort Join Request", {"cohort": cohort.name}) }} {{ _("Join Requests") }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if is_mentor %} {% set sg = mentor.get_subgroup() %}
|
{% if is_mentor %} {% set sg = mentor.get_subgroup() %}
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ course.title }} {% endblock %} {% block page_content %} {% if cohorts %}
|
|||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
||||||
_("Subgroups") }} | {{ frappe.db.count("Cohort Mentor", {"cohort":
|
_("Subgroups") }} | {{ frappe.db.count("Cohort Mentor", {"cohort":
|
||||||
cohort.name}) }} {{ _("Mentors") }} | {{ frappe.db.count("LMS
|
cohort.name}) }} {{ _("Mentors") }}
|
||||||
Enrollment", {"cohort": cohort.name}) }} {{ _("Students") }} | {{
|
| {{ frappe.db.count("LMS Enrollment", {"cohort": cohort.name}) }} {{ _("Students") }}
|
||||||
frappe.db.count("Cohort Join Request", {"cohort": cohort.name}) }}
|
| {{ frappe.db.count("Cohort Join Request", {"cohort": cohort.name}) }}
|
||||||
{{ _("Join Requests") }}
|
{{ _("Join Requests") }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user