i use below script to auto populate debit field in account table in journal entry doc form custom field called amount in a journal entry doc but not working
frappe.ui.form.on(“Journal Entry Account”, {
debit_in_account_currency: function(frm, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
if(debit_in_account_currency) {
row.debit_in_account_currency = doc.amount;
refresh_field(“debit_in_account_currency”, cdn, “accounts”);
} else {
this.frm.script_manager.copy_from_first_row(“accounts”, row, [“debit_in_account_currency”]);
}
}});