From c21168c509401035eb16aed89a1082b09d79840d Mon Sep 17 00:00:00 2001 From: Sanket Shah <113279972+Sanket322@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:42:04 +0530 Subject: [PATCH] fix: don't update party-type on change of cost center in Journal Entry (#45291) fix: don't update party-type on change of cost center Co-authored-by: Sanket322 --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 63ede57912..3d6aab4d1a 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -514,12 +514,6 @@ frappe.ui.form.on("Journal Entry Account", { }); } }, - cost_center: function (frm, dt, dn) { - // Don't reset for Gain/Loss type journals, as it will make Debit and Credit values '0' - if (frm.doc.voucher_type != "Exchange Gain Or Loss") { - erpnext.journal_entry.set_account_details(frm, dt, dn); - } - }, account: function (frm, dt, dn) { erpnext.journal_entry.set_account_details(frm, dt, dn); -- GitLab