[fix] Minor changes in grant application
diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.js b/erpnext/non_profit/doctype/grant_application/grant_application.js
index e13fee9..d560804 100644
--- a/erpnext/non_profit/doctype/grant_application/grant_application.js
+++ b/erpnext/non_profit/doctype/grant_application/grant_application.js
@@ -13,15 +13,15 @@
frappe.contacts.clear_address_and_contact(frm);
}
- frm.add_custom_button(__("Send Grant Review Email"), function() {
- if (frm.doc.status==="Received") {
+ if(frm.doc.status == 'Received'){
+ frm.add_custom_button(__("Send Grant Review Email"), function() {
frappe.call({
method: "erpnext.non_profit.doctype.grant_application.grant_application.send_grant_review_emails",
args: {
grant_application: frm.doc.name
}
});
- }
- });
+ });
+ }
}
});
diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py
index b3fb1a9..6b9ba32 100644
--- a/erpnext/non_profit/doctype/grant_application/grant_application.py
+++ b/erpnext/non_profit/doctype/grant_application/grant_application.py
@@ -36,16 +36,6 @@
context.order_by = 'creation desc'
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
-#Assement Manager review grant on website and submit result
-@frappe.whitelist(allow_guest=True)
-def assessment_result(title, assessment_scale, note):
- vote = frappe.get_doc("Grant Application", title)
- vote.assessment_scale = assessment_scale
- vote.note = note
- vote.save()
- frappe.db.commit()
- return "Thank you for Assessment Review"
-
@frappe.whitelist()
@@ -61,7 +51,8 @@
reference_name=grant.name
)
- grant.status = "In Progress"
+ grant.status = 'In Progress'
grant.save()
+ frappe.db.commit()
- frappe.msgprint(_("Review Invitation Sent"))
+ frappe.msgprint(_("Review Invitation Sent"))
\ No newline at end of file