Total Required in Child Table

Hi All,

I need your help to get the total hours worked by the employee in child table using “Custom Script” or through “Depends On”

Else I need total hours worked by all employee under different field from child table.

If you have any suggestion please do let me know I tried to do with Custom script but it didn’t worked for me.

can you describe what exactly did not work in the script?

did you try to debug it?
did the subpart get called correctly?

Thanks for replying @moe01325

I tried using the below code.

	{
	    frappe.ui.form.on("IN OUT Details", "time_in", function(frm) {
            total_hours1(frm);
        });

        frappe.ui.form.on("IN OUT Details", "time_out", function(frm) {
            total_hours1(frm);
        });

    var total_hours1 = function(frm) {
        var total_hours1 = flt(frm.doc.time_out) - flt(frm.doc.time_in);
            frm.set_value("total_hours1", total_hours1);
        };

    }}});