Delete child table row and total field automatically refresh

I want if i delete the row total automatically change can anyone plz help me with client script

hai @Kaushal_Khute Are you got solution for this event? if you got it please tell me to solve this

Hai @Kaushal_Khute have a great day!!!
Its working

purchase_request_item_remove: function(frm,cdt,cdn){
var d = locals[cdt][cdn];
var total = 0;
frm.doc.purchase_request_item.forEach(function(d){ total += d.amount; });
frm.set_value(‘total_amount’, total);
purchase_request_item: This is the child table field name which is linked in parent doctype,
d.amount : field name in child table which is you want to total

Thank you it’s work

I need fetch customer data 1 doctype to another doctype but base on country
another doctype i want to show only 2 country filter data
can you help on that