Merge pull request #37475 from iamrishiksahu/fix/#37231-doc-is-not-defined
fix: fixed the doc not defined issue.
diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js
index a2e4bda..3545521 100644
--- a/erpnext/public/js/controllers/accounts.js
+++ b/erpnext/public/js/controllers/accounts.js
@@ -116,7 +116,7 @@
account_head: function(frm, cdt, cdn) {
let d = locals[cdt][cdn];
- if (doc.docstatus == 1) {
+ if (d.docstatus == 1) {
// Should not trigger any changes on change post submit
return;
}