I’m trying to sum totals for the rows in a child table, but I want to get this calculation to run in real time and summed up in the parent field.
total_references:function(frm, cdt, cdn){
var d = locals[cdt][cdn];
var total = 0;
frm.doc.references.forEach(function(d) { total += d.total_amount; });
frm.set_value("total_references", total);
refresh_field("total_references");
},