fix: show price on all course cards

This commit is contained in:
Jannat Patel
2023-08-16 11:51:05 +05:30
parent 211775dba5
commit c2a6697f72
6 changed files with 15 additions and 11 deletions

View File

@@ -194,7 +194,7 @@
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"mandatory_depends_on": "paid_certificate",
"mandatory_depends_on": "paid_course",
"options": "Currency"
},
{
@@ -223,7 +223,7 @@
"fieldtype": "Currency",
"label": "Course Price",
"option": "currency",
"mandatory_depends_on": "paid_certificate"
"mandatory_depends_on": "paid_course"
},
{
"fieldname": "column_break_rxww",
@@ -254,7 +254,7 @@
}
],
"make_attachments_public": 1,
"modified": "2023-08-02 12:07:26.354119",
"modified": "2023-08-02 12:07:26.354110",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course",

View File

@@ -559,7 +559,9 @@ def get_courses_under_review():
"title",
"short_introduction",
"image",
"enable_certification",
"paid_course",
"course_price",
"currency",
"status",
"published",
],

View File

@@ -110,7 +110,7 @@
<div class="course-price">
{% if course.paid_course %}
{{ format_amount(course.course_price, course.currency) }}
{{ frappe.utils.fmt_money(course.course_price, 0, course.currency) }}
{% else %}
{{ _("Free") }}
{% endif %}

View File

@@ -103,8 +103,8 @@ def get_enrolled_courses():
"short_introduction",
"image",
"enable_certification",
"paid_certificate",
"price_certificate",
"paid_course",
"course_price",
"currency",
"published",
],
@@ -148,7 +148,9 @@ def get_authored_courses(member=None, only_published=True):
"title",
"short_introduction",
"image",
"enable_certification",
"paid_course",
"course_price",
"currency",
"status",
"published",
],

View File

@@ -129,8 +129,8 @@ def get_class_course_details(class_courses):
"upcoming",
"short_introduction",
"image",
"paid_certificate",
"price_certificate",
"paid_course",
"course_price",
"enable_certification",
"currency",
],

View File

@@ -123,7 +123,7 @@
{{ Notes(course) }}
<div class="vertically-center mb-3 bold-heading">
{{ format_amount(course.course_price, course.currency) }}
{{ frappe.utils.fmt_money(course.course_price, 0, course.currency) }}
</div>
<div class="vertically-center mb-3">