fix: batch confirmation email template
This commit is contained in:
@@ -79,13 +79,20 @@ def send_mail(doc):
|
|||||||
batch = frappe.db.get_value(
|
batch = frappe.db.get_value(
|
||||||
"LMS Batch",
|
"LMS Batch",
|
||||||
doc.batch,
|
doc.batch,
|
||||||
["name", "title", "start_date", "start_time", "medium"],
|
[
|
||||||
|
"name",
|
||||||
|
"title",
|
||||||
|
"start_date",
|
||||||
|
"start_time",
|
||||||
|
"medium",
|
||||||
|
"confirmation_email_template",
|
||||||
|
],
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
subject = _("Enrollment Confirmation for {0}").format(batch.title)
|
subject = _("Enrollment Confirmation for {0}").format(batch.title)
|
||||||
template = "batch_confirmation"
|
template = "batch_confirmation"
|
||||||
custom_template = frappe.db.get_single_value(
|
custom_template = batch.confirmation_email_template or frappe.db.get_single_value(
|
||||||
"LMS Settings", "batch_confirmation_template"
|
"LMS Settings", "batch_confirmation_template"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user