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 <shahsanket322003.com>
This commit is contained in:
Sanket Shah
2025-01-17 16:42:04 +05:30
committed by GitHub
parent aa38895caf
commit 19c8708e5e

View File

@@ -430,12 +430,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);