Sum fields amount From Child Table V7

Well, sorry I couldn’t be of more help. . .

ill update when find it out thank you @cpurbaugh for all the time and trouble :slight_smile:

@Randy_Lowery you can use this .csv file to import my testbed doctypes:

@Randy_Lowery You can use this file to import the custom script:

@cpurbaugh yes you where right the scrip does work what i did for anyone who read this is at Parent doc level recreate my field that is linked to the table denominaciones with the name table and use this scrip

frappe.ui.form.on(“Denominaciones”, {
denominacion: function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
var total = 0;
frappe.model.set_value(d.doctype, d.name, “valor”, d.denominacion * d.cantidad);
frm.doc.table.forEach(function(d) { total += d.valor; });
frm.set_value(‘balance_real’, total);
}
});

frappe.ui.form.on(“Denominaciones”, {
cantidad: function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
var total = 0;
frappe.model.set_value(d.doctype, d.name, “valor”, d.denominacion * d.cantidad);
frm.doc.table.forEach(function(d) { total += d.valor; });
frm.set_value(‘balance_real’, total);
}
});

thank you i couldn’t figure out without your help.!!

3 Likes

I’m glad I could help!

1 Like