From 7e758a9d5b891c78f94dface8bb80a625d13dcb4 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 17 Jun 2025 14:32:20 +0530 Subject: [PATCH] fix: do not reset party account for return doc --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index c42bf978fad..068202fcde6 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1017,7 +1017,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } var party = me.frm.doc[frappe.model.scrub(party_type)]; - if(party && me.frm.doc.company) { + if(party && me.frm.doc.company && !me.frm.doc.__onload?.load_after_mapping && !me.frm.doc.get(party_account_field)) { return frappe.call({ method: "erpnext.accounts.party.get_party_account", args: {