diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index ed6d0a710a..07761c7705 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -977,6 +977,7 @@ frappe.ui.form.on('Payment Entry', { precision("difference_amount")); const add_deductions = (details) => { + let row = null; if (!write_off_row.length && difference_amount) { row = frm.add_child("deductions"); row.account = details[account];