Hi. I’m quite new at working with ERPNext and I’m trying to subtract two custom fields I have created with a Custom Script. Both fields are located in “Projects” and they are “WorkHours” and “HoursDone”.
I need to calculate the RemainingHours of the project. I tried this:
frappe.ui.form.on (“Project”, “RemainingHours”, function (frm) {
frappe.model.set_value (“RemainingHouse”, (frm.doc.WorkHours-frm.doc.HoursDone));
});