I need a script that will help me to add up the Total Amounts in all the rows and present it in the Total Travel cost as seen in the screenshot
let table = frm.doc.costing
let total_cost = 0
table.forEach(e=>{
total_cost += e.total_amount
})
frm.set_value(‘total_travel_cost’,total_cost)
frm.refresh_field(total_travel_cost)