feat: paid courses

This commit is contained in:
Jannat Patel
2023-08-02 18:08:42 +05:30
parent a5bc30f776
commit 79d9f31db7
14 changed files with 138 additions and 187 deletions

View File

@@ -0,0 +1,20 @@
import frappe
def execute():
courses = frappe.get_all(
"LMS Course",
{"paid_certificate": ["is", "set"]},
["name", "price_certificate", "currency"],
)
for course in courses:
frappe.db.set_value(
"LMS Course",
course.name,
{
"paid_course": 1,
"course_price": course.price_certificate,
"currency": course.currency,
},
)