Child Table Update Listener

I am trying to create a form in which the value of a field in the doctype is updated based on the updates made to a child table. For example, the child table will have three fields (number of days, number of people, daily wage). The “Total Amount” in the parent doc will be calculated by multiplying the three above fields and adding up all the entries in the table.

Whats the best way to go ahead?

Listen to the change event of these fields and recalculate. Share you script if you need any help.

Edit: frappe.ui.form.on("Child Table", "fieldname", function(frm, child_doctype, child_name) { });