Try ERPNext Buy Support Partners Foundation

Child Table - Update Values

frappe.ui.form.on(‘Sales Invoice Item’,
{
refresh(frm)
{
// your code here
var total_qty = 0;
$.each(frm.doc.items || [], function(i, d)
{
total_qty = flt(d.rate)*flt(d.qty)*flt(d.نسبة_انجاز_الأعمال);
frm.set_value(‘amount’,total_qty);
});
frm.refresh_fields();
}
});

I wrote this code , but Amount Filed do not Update !

Set event as rate or qty

Than amount will modify based on change of rate or qty

frappe.ui.form.on(‘Sales Invoice Item’,{ rate(frm){
// your code here
var total_qty = 0;
$.each(frm.doc.items || [], function(i, d){
total_qty = flt(d.rate)*flt(d.qty)*flt(d.نسبة_انجاز_الأعمال);
frm.set_value(‘amount’,total_qty);
});
frm.refresh_fields();
}
});

Correct Syntax Error