Merge branch 'main' into quiz-refactor
This commit is contained in:
@@ -384,11 +384,9 @@ def get_timetable_details(timetable):
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def send_email_to_students(batch, subject, message):
|
def send_email_to_students(batch, subject, reply_to, message):
|
||||||
frappe.only_for("Moderator")
|
frappe.only_for("Moderator")
|
||||||
students = frappe.get_all("Batch Student", {"parent": batch}, pluck="student")
|
students = frappe.get_all("Batch Student", {"parent": batch}, pluck="student")
|
||||||
frappe.sendmail(
|
frappe.sendmail(
|
||||||
recipients=students,
|
recipients=students, subject=subject, reply_to=reply_to, message=message
|
||||||
subject=subject,
|
|
||||||
message=message,
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
"payment_for_document_type",
|
||||||
"member",
|
"member",
|
||||||
"column_break_rqkd",
|
"column_break_rqkd",
|
||||||
|
"payment_for_document",
|
||||||
"billing_name",
|
"billing_name",
|
||||||
"payment_received",
|
"payment_received",
|
||||||
"payment_details_section",
|
"payment_details_section",
|
||||||
@@ -115,11 +117,23 @@
|
|||||||
"fieldname": "amount_with_gst",
|
"fieldname": "amount_with_gst",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Amount with GST"
|
"label": "Amount with GST"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "payment_for_document_type",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Payment for Document Type",
|
||||||
|
"options": "\nLMS Course\nLMS Batch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "payment_for_document",
|
||||||
|
"fieldtype": "Dynamic Link",
|
||||||
|
"label": "Payment for Document",
|
||||||
|
"options": "payment_for_document_type"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-09-12 10:40:22.721371",
|
"modified": "2023-10-17 23:17:50.334975",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Payment",
|
"name": "LMS Payment",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import frappe
|
|||||||
import json
|
import json
|
||||||
import razorpay
|
import razorpay
|
||||||
import requests
|
import requests
|
||||||
import base64
|
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.desk.doctype.dashboard_chart.dashboard_chart import get_result
|
from frappe.desk.doctype.dashboard_chart.dashboard_chart import get_result
|
||||||
from frappe.desk.doctype.notification_log.notification_log import make_notification_logs
|
from frappe.desk.doctype.notification_log.notification_log import make_notification_logs
|
||||||
@@ -1029,6 +1028,8 @@ def record_payment(address, response, client, doctype, docname):
|
|||||||
"amount_with_gst": payment_details["amount_with_gst"],
|
"amount_with_gst": payment_details["amount_with_gst"],
|
||||||
"gstin": address.gstin,
|
"gstin": address.gstin,
|
||||||
"pan": address.pan,
|
"pan": address.pan,
|
||||||
|
"payment_for_document_type": doctype,
|
||||||
|
"payment_for_document": docname,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
payment_doc.save(ignore_permissions=True)
|
payment_doc.save(ignore_permissions=True)
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
{%- block script %}
|
{%- block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@editorjs/paragraph@latest"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.10.0"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@editorjs/header@latest"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@editorjs/header@latest"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@editorjs/embed@latest"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@editorjs/embed@latest"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -785,6 +785,12 @@ const email_to_students = () => {
|
|||||||
label: __("Subject"),
|
label: __("Subject"),
|
||||||
reqd: 1,
|
reqd: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldtype: "Data",
|
||||||
|
fieldname: "reply_to",
|
||||||
|
label: __("Reply To"),
|
||||||
|
reqd: 0,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldtype: "Text Editor",
|
fieldtype: "Text Editor",
|
||||||
fieldname: "message",
|
fieldname: "message",
|
||||||
@@ -807,6 +813,7 @@ const send_email = (values) => {
|
|||||||
args: {
|
args: {
|
||||||
batch: $(".class-details").data("batch"),
|
batch: $(".class-details").data("batch"),
|
||||||
subject: values.subject,
|
subject: values.subject,
|
||||||
|
reply_to: values.reply_to,
|
||||||
message: values.message,
|
message: values.message,
|
||||||
},
|
},
|
||||||
callback: (r) => {
|
callback: (r) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user