display message if details to fetch grade isnt filled up

This commit is contained in:
Zlash65 2018-12-03 12:15:10 +05:30
parent ce72d26e95
commit db43c3af68

View File

@ -50,6 +50,12 @@ frappe.ui.form.on("Assessment Result", {
frappe.ui.form.on("Assessment Result Detail", {
score: function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.maximum_score || !frm.doc.grading_scale) {
d.score = "";
frappe.throw(__("Please fill in all the details to generate Assessment Result."));
}
if (d.score > d.maximum_score) {
frappe.throw(__("Score cannot be greater than Maximum Score"));
}