Hi,
I am new to ERPNEXT, and I am playing with Assessment Result to generate students mark sheet.
Can any one guide me, how to add percentage obtained in the marksheet.
And If I want to further customize the student marksheet, from where I should start.
I am trying to create custom field and trying to use client script, to calculate the percentage using Maximum score / total score * 100 to get the students percentage on the report, using the below code, but it is not working.
frappe.ui.form.on(‘Assessment Result’, {
total_score: function(frm) {
calculate_percentage(frm);
},
maximum_score: function(frm) {
calculate_percentage(frm);
}
});
function calculate_percentage(frm) {
if (frm.doc.total_score && frm.doc.maximum_score) {
frm.set_value(‘tot_percent’, (frm.doc.total_score / frm.doc.maximum_score) * 100);
} else {
frm.set_value(‘tot_percent’, 0);
}
}