Calculate total in a child table of sales invoice

I want to calculate data in item table which is child table of sales invoice.

frappe.ui.form.on(“Sales Invoice Item”, “item_code”, function(frm, cdt, cdn){
cost for total cost per item
var d = locals[cdt][cdn]
frappe.model.set_value(d.doctype, d.name, “packing_total”, flt(d.qty * d.packing_charges));
});

this is my code where i want the total in packing total which is qty*packing charges.
Please Help.

Hi @SonalD,

Please check this topic.

Thank You!

thank you… Thts working.