diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 5c00aff587d5..b50dcd217e7c 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -658,7 +658,7 @@ frappe.ui.form.on("Payment Entry", { frm.set_value("source_exchange_rate", 1); } else if (frm.doc.paid_from) { if (["Internal Transfer", "Pay"].includes(frm.doc.payment_type)) { - let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; + let company_currency = frappe.get_doc(":Company", frm.doc.company)?.default_currency; frappe.call({ method: "erpnext.setup.utils.get_exchange_rate", args: {