From e5b02e81a92ad30aa846961921f14dbcabcd9b72 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 6 Jan 2026 17:38:01 +0530 Subject: [PATCH] fix: unsaved status on opening gain loss journal --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 9a9c02ba5e7..c115204c28b 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -126,9 +126,11 @@ frappe.ui.form.on("Journal Entry", { erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm); - $.each(frm.doc.accounts || [], function (i, row) { - erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name); - }); + if (frm.doc.voucher_type !== "Exchange Gain Or Loss") { + $.each(frm.doc.accounts || [], function (i, row) { + erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name); + }); + } }, before_save: function (frm) { if (frm.doc.docstatus == 0 && !frm.doc.is_system_generated) {