Custom Script for Expense claim

frappe.ui.form.on(“Expense Claim”, “refresh”, function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, “balance_returnable_amount”, d.allotted__amount - d. total_sanctioned_amount);
balance_returnable_amount.toFixed(0);
refresh_field(“balance_returnable_amount”);
});

Above is the script I have written for the expense claim , the field does not show rounded figures.Can anyone help me out?

What version are you using? I don’t see any of those fields in the form or any related child table.

Can you kindly share your use case to help you better?

Hi,
Thank You for replying . I found the solution for the above script. If you want I can share the solution.

Thanks,
Basant